@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public static function isCallable($var, $syntaxOnly = false) |
20 | 20 | { |
21 | - if (! is_array($var)) { |
|
21 | + if (!is_array($var)) { |
|
22 | 22 | return is_callable($var, $syntaxOnly); |
23 | 23 | } |
24 | 24 | |
25 | - if ((! isset($var[0]) || ! isset($var[1])) || |
|
26 | - ! is_string($var[1] ?? null)) { |
|
25 | + if ((!isset($var[0]) || !isset($var[1])) || |
|
26 | + !is_string($var[1] ?? null)) { |
|
27 | 27 | return false; |
28 | 28 | } |
29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $method = $var[1]; |
39 | 39 | |
40 | - if (! class_exists($class)) { |
|
40 | + if (!class_exists($class)) { |
|
41 | 41 | return false; |
42 | 42 | } |
43 | 43 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return (new ReflectionMethod($class, '__call'))->isPublic(); |
50 | 50 | } |
51 | 51 | |
52 | - if (! is_object($var[0]) && method_exists($class, '__callStatic')) { |
|
52 | + if (!is_object($var[0]) && method_exists($class, '__callStatic')) { |
|
53 | 53 | return (new ReflectionMethod($class, '__callStatic'))->isPublic(); |
54 | 54 | } |
55 | 55 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $type = $parameter->getType(); |
68 | 68 | |
69 | - if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) { |
|
69 | + if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) { |
|
70 | 70 | return; |
71 | 71 | } |
72 | 72 | |
@@ -83,14 +83,14 @@ discard block |
||
83 | 83 | { |
84 | 84 | $type = $parameter->getType(); |
85 | 85 | |
86 | - if (! $type instanceof ReflectionUnionType) { |
|
86 | + if (!$type instanceof ReflectionUnionType) { |
|
87 | 87 | return array_filter([static::getParameterClassName($parameter)]); |
88 | 88 | } |
89 | 89 | |
90 | 90 | $unionTypes = []; |
91 | 91 | |
92 | 92 | foreach ($type->getTypes() as $listedType) { |
93 | - if (! $listedType instanceof ReflectionNamedType || $listedType->isBuiltin()) { |
|
93 | + if (!$listedType instanceof ReflectionNamedType || $listedType->isBuiltin()) { |
|
94 | 94 | continue; |
95 | 95 | } |
96 | 96 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | { |
112 | 112 | $name = $type->getName(); |
113 | 113 | |
114 | - if (! is_null($class = $parameter->getDeclaringClass())) { |
|
114 | + if (!is_null($class = $parameter->getDeclaringClass())) { |
|
115 | 115 | if ($name === 'self') { |
116 | 116 | return $class->getName(); |
117 | 117 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | public static function get($key, $default = null) |
75 | 75 | { |
76 | 76 | return Option::fromValue(static::getRepository()->get($key)) |
77 | - ->map(function ($value) { |
|
77 | + ->map(function($value) { |
|
78 | 78 | switch (strtolower($value)) { |
79 | 79 | case 'true': |
80 | 80 | case '(true)': |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | return $value; |
98 | 98 | }) |
99 | - ->getOrCall(function () use ($default) { |
|
99 | + ->getOrCall(function() use ($default) { |
|
100 | 100 | return value($default); |
101 | 101 | }); |
102 | 102 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function unless($value, $callback, $default = null) |
35 | 35 | { |
36 | - if (! $value) { |
|
36 | + if (!$value) { |
|
37 | 37 | return $callback($this, $value) ?: $this; |
38 | 38 | } elseif ($default) { |
39 | 39 | return $default($this, $value) ?: $this; |
@@ -21,10 +21,10 @@ |
||
21 | 21 | { |
22 | 22 | try { |
23 | 23 | return $object->{$method}(...$parameters); |
24 | - } catch (Error|BadMethodCallException $e) { |
|
24 | + } catch (Error | BadMethodCallException $e) { |
|
25 | 25 | $pattern = '~^Call to undefined method (?P<class>[^:]+)::(?P<method>[^\(]+)\(\)$~'; |
26 | 26 | |
27 | - if (! preg_match($pattern, $e->getMessage(), $matches)) { |
|
27 | + if (!preg_match($pattern, $e->getMessage(), $matches)) { |
|
28 | 28 | throw $e; |
29 | 29 | } |
30 | 30 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | $types = array_values($this->closureParameterTypes($closure)); |
24 | 24 | |
25 | - if (! $types) { |
|
25 | + if (!$types) { |
|
26 | 26 | throw new RuntimeException('The given Closure has no parameters.'); |
27 | 27 | } |
28 | 28 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $reflection = new ReflectionFunction($closure); |
48 | 48 | |
49 | - $types = collect($reflection->getParameters())->mapWithKeys(function ($parameter) { |
|
49 | + $types = collect($reflection->getParameters())->mapWithKeys(function($parameter) { |
|
50 | 50 | if ($parameter->isVariadic()) { |
51 | 51 | return [$parameter->getName() => null]; |
52 | 52 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | $reflection = new ReflectionFunction($closure); |
79 | 79 | |
80 | - return collect($reflection->getParameters())->mapWithKeys(function ($parameter) { |
|
80 | + return collect($reflection->getParameters())->mapWithKeys(function($parameter) { |
|
81 | 81 | if ($parameter->isVariadic()) { |
82 | 82 | return [$parameter->getName() => null]; |
83 | 83 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public function withLocale($locale, $callback) |
17 | 17 | { |
18 | - if (! $locale) { |
|
18 | + if (!$locale) { |
|
19 | 19 | return $callback(); |
20 | 20 | } |
21 | 21 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | $this->container = $container; |
33 | 33 | |
34 | - if (! $this->container->bound('config')) { |
|
34 | + if (!$this->container->bound('config')) { |
|
35 | 35 | $this->container->instance('config', new Fluent); |
36 | 36 | } |
37 | 37 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public static function has($key) |
21 | 21 | { |
22 | - return ! is_null(static::$app['request']->cookie($key, null)); |
|
22 | + return !is_null(static::$app['request']->cookie($key, null)); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | public static function routes(array $options = []) |
58 | 58 | { |
59 | - if (! static::$app->providerIsLoaded(UiServiceProvider::class)) { |
|
59 | + if (!static::$app->providerIsLoaded(UiServiceProvider::class)) { |
|
60 | 60 | throw new RuntimeException('In order to use the Auth::routes() method, please install the laravel/ui package.'); |
61 | 61 | } |
62 | 62 |