@@ -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 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $callback(static::getFacadeRoot()); |
38 | 38 | } |
39 | 39 | |
40 | - static::$app->afterResolving($accessor, function ($service) use ($callback) { |
|
40 | + static::$app->afterResolving($accessor, function($service) use ($callback) { |
|
41 | 41 | $callback($service); |
42 | 42 | }); |
43 | 43 | } |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public static function spy() |
51 | 51 | { |
52 | - if (! static::isMock()) { |
|
52 | + if (!static::isMock()) { |
|
53 | 53 | $class = static::getMockableClass(); |
54 | 54 | |
55 | - return tap($class ? Mockery::spy($class) : Mockery::spy(), function ($spy) { |
|
55 | + return tap($class ? Mockery::spy($class) : Mockery::spy(), function($spy) { |
|
56 | 56 | static::swap($spy); |
57 | 57 | }); |
58 | 58 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | protected static function createFreshMockInstance() |
99 | 99 | { |
100 | - return tap(static::createMock(), function ($mock) { |
|
100 | + return tap(static::createMock(), function($mock) { |
|
101 | 101 | static::swap($mock); |
102 | 102 | |
103 | 103 | $mock->shouldAllowMockingProtectedMethods(); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | { |
255 | 255 | $instance = static::getFacadeRoot(); |
256 | 256 | |
257 | - if (! $instance) { |
|
257 | + if (!$instance) { |
|
258 | 258 | throw new RuntimeException('A facade root has not been set.'); |
259 | 259 | } |
260 | 260 |
@@ -109,7 +109,7 @@ |
||
109 | 109 | */ |
110 | 110 | protected static function resolveFacadeInstance($name) |
111 | 111 | { |
112 | - if (! isset(static::$resolvedInstance[$name]) && ! isset(static::$app, static::$app[$name])) { |
|
112 | + if (!isset(static::$resolvedInstance[$name]) && !isset(static::$app, static::$app[$name])) { |
|
113 | 113 | $class = static::DEFAULT_FACADE; |
114 | 114 | |
115 | 115 | static::swap(new $class); |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | public static function fakeExcept($eventsToAllow) |
55 | 55 | { |
56 | 56 | return static::fake([ |
57 | - function ($eventName) use ($eventsToAllow) { |
|
58 | - return ! in_array($eventName, (array) $eventsToAllow); |
|
57 | + function($eventName) use ($eventsToAllow) { |
|
58 | + return !in_array($eventName, (array) $eventsToAllow); |
|
59 | 59 | }, |
60 | 60 | ]); |
61 | 61 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | static::fake($eventsToFake); |
75 | 75 | |
76 | - return tap($callable(), function () use ($originalDispatcher) { |
|
76 | + return tap($callable(), function() use ($originalDispatcher) { |
|
77 | 77 | static::swap($originalDispatcher); |
78 | 78 | |
79 | 79 | Model::setEventDispatcher($originalDispatcher); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | static::fakeExcept($eventsToAllow); |
96 | 96 | |
97 | - return tap($callable(), function () use ($originalDispatcher) { |
|
97 | + return tap($callable(), function() use ($originalDispatcher) { |
|
98 | 98 | static::swap($originalDispatcher); |
99 | 99 | |
100 | 100 | Model::setEventDispatcher($originalDispatcher); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | public static function containsAll($haystack, array $needles) |
213 | 213 | { |
214 | 214 | foreach ($needles as $needle) { |
215 | - if (! static::contains($haystack, $needle)) { |
|
215 | + if (!static::contains($haystack, $needle)) { |
|
216 | 216 | return false; |
217 | 217 | } |
218 | 218 | } |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | */ |
317 | 317 | public static function isUuid($value) |
318 | 318 | { |
319 | - if (! is_string($value)) { |
|
319 | + if (!is_string($value)) { |
|
320 | 320 | return false; |
321 | 321 | } |
322 | 322 | |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | { |
391 | 391 | preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches); |
392 | 392 | |
393 | - if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) { |
|
393 | + if (!isset($matches[0]) || static::length($value) === static::length($matches[0])) { |
|
394 | 394 | return $value; |
395 | 395 | } |
396 | 396 | |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | { |
463 | 463 | preg_match($pattern, $subject, $matches); |
464 | 464 | |
465 | - if (! $matches) { |
|
465 | + if (!$matches) { |
|
466 | 466 | return ''; |
467 | 467 | } |
468 | 468 | |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | return static::$snakeCache[$key][$delimiter]; |
818 | 818 | } |
819 | 819 | |
820 | - if (! ctype_lower($value)) { |
|
820 | + if (!ctype_lower($value)) { |
|
821 | 821 | $value = preg_replace('/\s+/u', '', ucwords($value)); |
822 | 822 | |
823 | 823 | $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value)); |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | |
861 | 861 | $words = explode(' ', static::replace(['-', '_'], ' ', $value)); |
862 | 862 | |
863 | - $studlyWords = array_map(function ($word) { |
|
863 | + $studlyWords = array_map(function($word) { |
|
864 | 864 | return static::ucfirst($word); |
865 | 865 | }, $words); |
866 | 866 | |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | */ |
892 | 892 | public static function substrCount($haystack, $needle, $offset = 0, $length = null) |
893 | 893 | { |
894 | - if (! is_null($length)) { |
|
894 | + if (!is_null($length)) { |
|
895 | 895 | return substr_count($haystack, $needle, $offset, $length); |
896 | 896 | } else { |
897 | 897 | return substr_count($haystack, $needle, $offset); |