Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -34,12 +34,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class UserGroupBill implements BinderInterface
{
/**
* @param string $value
* @param Route $route
*
* @return Bill
* @throws NotFoundHttpException
*
*/
public static function routeBinder(string $value, Route $route): Bill
{
@@ -47,12 +42,14 @@ class UserGroupBill implements BinderInterface
/** @var User $user */
$user = auth()->user();
$currency = Bill::where('id', (int)$value)
->where('user_group_id', $user->user_group_id)
->first();
->where('user_group_id', $user->user_group_id)
->first()
;
if (null !== $currency) {
return $currency;
}
}
throw new NotFoundHttpException();
}
}