Apply php-cs-fixer changes
This commit is contained in:
parent
cec96062e3
commit
436e686037
72 changed files with 91 additions and 196 deletions
|
@ -20,8 +20,6 @@ class SubstituteApplicationApiBindings
|
|||
|
||||
/**
|
||||
* Mappings to automatically assign route parameters to a model.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static array $mappings = [
|
||||
'allocation' => Allocation::class,
|
||||
|
|
|
@ -26,7 +26,7 @@ class SubstituteClientApiBindings
|
|||
* Perform substitution of route parameters for the Client API.
|
||||
*
|
||||
* @param \Illuminate\Http\Request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
|
@ -73,7 +73,7 @@ class SubstituteClientApiBindings
|
|||
});
|
||||
|
||||
try {
|
||||
/** @var \Illuminate\Routing\Route $route */
|
||||
/* @var \Illuminate\Routing\Route $route */
|
||||
$this->router->substituteBindings($route = $request->route());
|
||||
} catch (ModelNotFoundException $exception) {
|
||||
if (isset($route) && $route->getMissing()) {
|
||||
|
|
|
@ -17,7 +17,7 @@ class PreventUnboundModels
|
|||
* added but not properly defined in the substitution middleware.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Exception
|
||||
|
@ -36,9 +36,7 @@ class PreventUnboundModels
|
|||
}
|
||||
|
||||
if (!$parameters[$signature->getName()] instanceof Model) {
|
||||
throw new Exception(
|
||||
sprintf('No parameter binding has been defined for model [%s] using route parameter key "%s".', $class, $signature->getName())
|
||||
);
|
||||
throw new Exception(sprintf('No parameter binding has been defined for model [%s] using route parameter key "%s".', $class, $signature->getName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue