Refactor some code for recurrences.

This commit is contained in:
James Cole
2019-06-08 06:19:21 +02:00
parent 7c2c24d330
commit 85f9c256a1
21 changed files with 369 additions and 468 deletions

View File

@@ -93,7 +93,7 @@ class BillFactory
}
/**
* @param int|null $billId
* @param int|null $billId
* @param null|string $billName
*
* @return Bill|null
@@ -126,8 +126,10 @@ class BillFactory
public function findByName(string $name): ?Bill
{
$query = sprintf('%%%s%%', $name);
/** @var Bill $first */
$first = $this->user->bills()->where('name', 'LIKE', $query)->first();
return $this->user->bills()->where('name', 'LIKE', $query)->first();
return $first;
}
/**