@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'Name', |
69 | 69 | 'Dispatch', |
70 | 70 | ]; |
71 | - $lengths = [ |
|
71 | + $lengths = [ |
|
72 | 72 | strlen($headerTexts[0]), |
73 | 73 | strlen($headerTexts[1]), |
74 | 74 | strlen($headerTexts[2]), |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ]; |
77 | 77 | |
78 | 78 | // Sort routes by path |
79 | - usort($routerRoutes, fn (Route $a, Route $b) => $a->getPath() <=> $b->getPath()); |
|
79 | + usort($routerRoutes, fn(Route $a, Route $b) => $a->getPath() <=> $b->getPath()); |
|
80 | 80 | |
81 | 81 | foreach ($routerRoutes as $route) { |
82 | 82 | $this->setRoute($route, $routes, $lengths); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $sepLine = $this->getSepLine($lengths); |
86 | 86 | $odd = false; |
87 | 87 | |
88 | - output()->writeMessage($this->oddFormat(! $odd) . $sepLine, true); |
|
88 | + output()->writeMessage($this->oddFormat(!$odd) . $sepLine, true); |
|
89 | 89 | $this->headerMessage($headerTexts, $lengths); |
90 | 90 | output()->writeMessage($sepLine, true); |
91 | 91 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | output()->writeMessage($routeMessage . static::END_FORMAT, true); |
111 | 111 | } |
112 | 112 | |
113 | - output()->writeMessage($this->oddFormat(! $odd) . $sepLine . static::END_FORMAT, true); |
|
113 | + output()->writeMessage($this->oddFormat(!$odd) . $sepLine . static::END_FORMAT, true); |
|
114 | 114 | |
115 | 115 | return 0; |
116 | 116 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | return $value . $glue . $routeValue; |
227 | 227 | } |
228 | 228 | |
229 | - if ($value && ! $routeValue) { |
|
229 | + if ($value && !$routeValue) { |
|
230 | 230 | return $value; |
231 | 231 | } |
232 | 232 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | */ |
328 | 328 | protected function verifyHandler($handler): void |
329 | 329 | { |
330 | - if (! is_string($handler) && ! ($handler instanceof Closure)) { |
|
330 | + if (!is_string($handler) && !($handler instanceof Closure)) { |
|
331 | 331 | throw new InvalidArgumentException('Invalid handler provided.'); |
332 | 332 | } |
333 | 333 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $container->setClosure( |
106 | 106 | Driver::class, |
107 | - static function (array $config, string $adapter) use ($container): Driver { |
|
107 | + static function(array $config, string $adapter) use ($container): Driver { |
|
108 | 108 | return new Driver( |
109 | 109 | $container->get( |
110 | 110 | $adapter, |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | { |
129 | 129 | $container->setClosure( |
130 | 130 | FlysystemAdapter::class, |
131 | - static function (array $config) use ($container) { |
|
131 | + static function(array $config) use ($container) { |
|
132 | 132 | return new FlysystemAdapter( |
133 | 133 | new Flysystem( |
134 | 134 | $container->get( |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | { |
155 | 155 | $container->setClosure( |
156 | 156 | FlysystemLocalAdapter::class, |
157 | - static function (array $config) { |
|
157 | + static function(array $config) { |
|
158 | 158 | return new FlysystemLocalAdapter( |
159 | 159 | $config['dir'] |
160 | 160 | ); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | { |
174 | 174 | $container->setClosure( |
175 | 175 | FlysystemAwsS3Adapter::class, |
176 | - static function (array $config) { |
|
176 | + static function(array $config) { |
|
177 | 177 | $clientConfig = [ |
178 | 178 | 'credentials' => [ |
179 | 179 | 'key' => $config['key'], |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public const PUBLIC = 'public'; |
29 | 29 | public const PRIVATE = 'private'; |
30 | 30 | |
31 | - protected static ?array $VALUES = [ |
|
31 | + protected static ? array $VALUES = [ |
|
32 | 32 | self::PUBLIC => self::PUBLIC, |
33 | 33 | self::PRIVATE => self::PRIVATE, |
34 | 34 | ]; |
@@ -93,7 +93,7 @@ |
||
93 | 93 | */ |
94 | 94 | protected function setListenerProperties(Listener $listener): void |
95 | 95 | { |
96 | - if (! $listener->getClass()) { |
|
96 | + if (!$listener->getClass()) { |
|
97 | 97 | throw new InvalidArgumentException('Invalid class defined in listener.'); |
98 | 98 | } |
99 | 99 |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | public function hasListeners(string $event): bool |
176 | 176 | { |
177 | - return $this->has($event) && ! empty(self::$events[$event]); |
|
177 | + return $this->has($event) && !empty(self::$events[$event]); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function add(string $event): void |
188 | 188 | { |
189 | - if (! $this->has($event)) { |
|
189 | + if (!$this->has($event)) { |
|
190 | 190 | self::$events[$event] = []; |
191 | 191 | } |
192 | 192 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | // The responses |
231 | 231 | $responses = []; |
232 | 232 | |
233 | - if (! $this->has($event) || ! $this->hasListeners($event)) { |
|
233 | + if (!$this->has($event) || !$this->hasListeners($event)) { |
|
234 | 234 | return $responses; |
235 | 235 | } |
236 | 236 |
@@ -97,7 +97,7 @@ |
||
97 | 97 | foreach ($data as $key => $datum) { |
98 | 98 | // If the data isn't found in the params array it is not a valid |
99 | 99 | // param |
100 | - if (! isset($params[$key])) { |
|
100 | + if (!isset($params[$key])) { |
|
101 | 101 | throw new InvalidArgumentException("Invalid route param '{$key}'"); |
102 | 102 | } |
103 | 103 |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | { |
186 | 186 | $segments = preg_split('~' . static::VARIABLE_REGEX . '(*SKIP)(*F) | \[~x', $path); |
187 | 187 | |
188 | - if (! is_array($segments)) { |
|
188 | + if (!is_array($segments)) { |
|
189 | 189 | throw new RuntimeException('Invalid path segments set in path: ' . $path); |
190 | 190 | } |
191 | 191 | |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | // Split the segment on that bracket |
311 | 311 | // Iterate through the parts |
312 | 312 | foreach (explode($deliminator, $segment) as $part) { |
313 | - if (! $part) { |
|
313 | + if (!$part) { |
|
314 | 314 | continue; |
315 | 315 | } |
316 | 316 |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | // If the session failed to start |
84 | - if (! session_start()) { |
|
84 | + if (!session_start()) { |
|
85 | 85 | // Throw a new exception |
86 | 86 | throw new SessionStartFailure('The session failed to start!'); |
87 | 87 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function remove(string $id): bool |
122 | 122 | { |
123 | - if (! $this->has($id)) { |
|
123 | + if (!$this->has($id)) { |
|
124 | 124 | return false; |
125 | 125 | } |
126 | 126 |