Clean up API code.

This commit is contained in:
James Cole
2018-07-05 18:02:02 +02:00
parent f6f8bb7fd1
commit 81d70bd811
28 changed files with 755 additions and 922 deletions

View File

@@ -269,12 +269,16 @@ class BudgetRepository implements BudgetRepositoryInterface
/**
* Find a budget or return NULL
*
* @param int $budgetId
* @param int $budgetId |null
*
* @return Budget|null
*/
public function findNull(int $budgetId): ?Budget
public function findNull(int $budgetId = null): ?Budget
{
if (null === $budgetId) {
return null;
}
return $this->user->budgets()->find($budgetId);
}