mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
chore: code cleanup.
This commit is contained in:
@@ -31,6 +31,16 @@ use FireflyIII\Models\ObjectGroup;
|
||||
*/
|
||||
trait CreatesObjectGroups
|
||||
{
|
||||
/**
|
||||
* @param string $title
|
||||
*
|
||||
* @return null|ObjectGroup
|
||||
*/
|
||||
protected function findObjectGroup(string $title): ?ObjectGroup
|
||||
{
|
||||
return $this->user->objectGroups()->where('title', $title)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $groupId
|
||||
*
|
||||
@@ -80,14 +90,4 @@ trait CreatesObjectGroups
|
||||
{
|
||||
return 1 === $this->user->objectGroups()->where('title', $title)->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
*
|
||||
* @return null|ObjectGroup
|
||||
*/
|
||||
protected function findObjectGroup(string $title): ?ObjectGroup
|
||||
{
|
||||
return $this->user->objectGroups()->where('title', $title)->first();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user