@@ -76,7 +76,7 @@ |
||
| 76 | 76 | // If the given driver has not been created before, we will create the instances |
| 77 | 77 | // here and cache it so we can return it next time very quickly. If there is |
| 78 | 78 | // already a driver created by this name, we'll just return that instance. |
| 79 | - if (! isset($this->drivers[$driver])) { |
|
| 79 | + if (!isset($this->drivers[$driver])) { |
|
| 80 | 80 | $this->drivers[$driver] = $this->createDriver($driver); |
| 81 | 81 | } |
| 82 | 82 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | use Illuminate\Support\HigherOrderTapProxy; |
| 8 | 8 | use Illuminate\Support\Optional; |
| 9 | 9 | |
| 10 | -if (! function_exists('append_config')) { |
|
| 10 | +if (!function_exists('append_config')) { |
|
| 11 | 11 | /** |
| 12 | 12 | * Assign high numeric IDs to a config item to force appending. |
| 13 | 13 | * |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | -if (! function_exists('blank')) { |
|
| 33 | +if (!function_exists('blank')) { |
|
| 34 | 34 | /** |
| 35 | 35 | * Determine if the given value is "blank". |
| 36 | 36 | * |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | -if (! function_exists('class_basename')) { |
|
| 62 | +if (!function_exists('class_basename')) { |
|
| 63 | 63 | /** |
| 64 | 64 | * Get the class "basename" of the given object / class. |
| 65 | 65 | * |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -if (! function_exists('class_uses_recursive')) { |
|
| 77 | +if (!function_exists('class_uses_recursive')) { |
|
| 78 | 78 | /** |
| 79 | 79 | * Returns all traits used by a class, its parent classes and trait of their traits. |
| 80 | 80 | * |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | -if (! function_exists('e')) { |
|
| 100 | +if (!function_exists('e')) { |
|
| 101 | 101 | /** |
| 102 | 102 | * Encode HTML special characters in a string. |
| 103 | 103 | * |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | -if (! function_exists('env')) { |
|
| 122 | +if (!function_exists('env')) { |
|
| 123 | 123 | /** |
| 124 | 124 | * Gets the value of an environment variable. |
| 125 | 125 | * |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | -if (! function_exists('filled')) { |
|
| 136 | +if (!function_exists('filled')) { |
|
| 137 | 137 | /** |
| 138 | 138 | * Determine if a value is "filled". |
| 139 | 139 | * |
@@ -142,11 +142,11 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | function filled($value) |
| 144 | 144 | { |
| 145 | - return ! blank($value); |
|
| 145 | + return !blank($value); |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | -if (! function_exists('object_get')) { |
|
| 149 | +if (!function_exists('object_get')) { |
|
| 150 | 150 | /** |
| 151 | 151 | * Get an item from an object using "dot" notation. |
| 152 | 152 | * |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | foreach (explode('.', $key) as $segment) { |
| 165 | - if (! is_object($object) || ! isset($object->{$segment})) { |
|
| 165 | + if (!is_object($object) || !isset($object->{$segment})) { |
|
| 166 | 166 | return value($default); |
| 167 | 167 | } |
| 168 | 168 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | -if (! function_exists('optional')) { |
|
| 176 | +if (!function_exists('optional')) { |
|
| 177 | 177 | /** |
| 178 | 178 | * Provide access to optional objects. |
| 179 | 179 | * |
@@ -185,13 +185,13 @@ discard block |
||
| 185 | 185 | { |
| 186 | 186 | if (is_null($callback)) { |
| 187 | 187 | return new Optional($value); |
| 188 | - } elseif (! is_null($value)) { |
|
| 188 | + } elseif (!is_null($value)) { |
|
| 189 | 189 | return $callback($value); |
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | -if (! function_exists('preg_replace_array')) { |
|
| 194 | +if (!function_exists('preg_replace_array')) { |
|
| 195 | 195 | /** |
| 196 | 196 | * Replace a given pattern with each value in the array in sequentially. |
| 197 | 197 | * |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | function preg_replace_array($pattern, array $replacements, $subject) |
| 204 | 204 | { |
| 205 | - return preg_replace_callback($pattern, function () use (&$replacements) { |
|
| 205 | + return preg_replace_callback($pattern, function() use (&$replacements) { |
|
| 206 | 206 | foreach ($replacements as $key => $value) { |
| 207 | 207 | return array_shift($replacements); |
| 208 | 208 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | -if (! function_exists('retry')) { |
|
| 213 | +if (!function_exists('retry')) { |
|
| 214 | 214 | /** |
| 215 | 215 | * Retry an operation a given number of times. |
| 216 | 216 | * |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | try { |
| 234 | 234 | return $callback($attempts); |
| 235 | 235 | } catch (Exception $e) { |
| 236 | - if ($times < 1 || ($when && ! $when($e))) { |
|
| 236 | + if ($times < 1 || ($when && !$when($e))) { |
|
| 237 | 237 | throw $e; |
| 238 | 238 | } |
| 239 | 239 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | -if (! function_exists('tap')) { |
|
| 249 | +if (!function_exists('tap')) { |
|
| 250 | 250 | /** |
| 251 | 251 | * Call the given Closure with the given value then return the value. |
| 252 | 252 | * |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | } |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | -if (! function_exists('throw_if')) { |
|
| 269 | +if (!function_exists('throw_if')) { |
|
| 270 | 270 | /** |
| 271 | 271 | * Throw the given exception if the given condition is true. |
| 272 | 272 | * |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | -if (! function_exists('throw_unless')) { |
|
| 294 | +if (!function_exists('throw_unless')) { |
|
| 295 | 295 | /** |
| 296 | 296 | * Throw the given exception unless the given condition is true. |
| 297 | 297 | * |
@@ -304,13 +304,13 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | function throw_unless($condition, $exception = 'RuntimeException', ...$parameters) |
| 306 | 306 | { |
| 307 | - throw_if(! $condition, $exception, ...$parameters); |
|
| 307 | + throw_if(!$condition, $exception, ...$parameters); |
|
| 308 | 308 | |
| 309 | 309 | return $condition; |
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | -if (! function_exists('trait_uses_recursive')) { |
|
| 313 | +if (!function_exists('trait_uses_recursive')) { |
|
| 314 | 314 | /** |
| 315 | 315 | * Returns all traits used by a trait and its traits. |
| 316 | 316 | * |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | } |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | -if (! function_exists('transform')) { |
|
| 332 | +if (!function_exists('transform')) { |
|
| 333 | 333 | /** |
| 334 | 334 | * Transform the given value if it is present. |
| 335 | 335 | * |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | } |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | -if (! function_exists('windows_os')) { |
|
| 355 | +if (!function_exists('windows_os')) { |
|
| 356 | 356 | /** |
| 357 | 357 | * Determine whether the current environment is Windows based. |
| 358 | 358 | * |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | -if (! function_exists('with')) { |
|
| 367 | +if (!function_exists('with')) { |
|
| 368 | 368 | /** |
| 369 | 369 | * Return the given value, optionally passed through the given callback. |
| 370 | 370 | * |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | return $data->toJson($flags | static::REQUIRED_FLAGS); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - if ($data instanceof Arrayable && ! ($data instanceof JsonSerializable)) { |
|
| 97 | + if ($data instanceof Arrayable && !($data instanceof JsonSerializable)) { |
|
| 98 | 98 | $data = $data->toArray(); |
| 99 | 99 | } |
| 100 | 100 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | |
| 224 | 224 | $segments = preg_split($pattern, $this->value, $limit, $flags); |
| 225 | 225 | |
| 226 | - return ! empty($segments) ? collect($segments) : collect(); |
|
| 226 | + return !empty($segments) ? collect($segments) : collect(); |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | /** |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | */ |
| 286 | 286 | public function isNotEmpty() |
| 287 | 287 | { |
| 288 | - return ! $this->isEmpty(); |
|
| 288 | + return !$this->isEmpty(); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /** |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | throw new InvalidArgumentException("Instance [{$name}] is not defined."); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if (! array_key_exists('driver', $config)) { |
|
| 106 | + if (!array_key_exists('driver', $config)) { |
|
| 107 | 107 | throw new RuntimeException("Instance [{$name}] does not specify a driver."); |
| 108 | 108 | } |
| 109 | 109 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function isNotEmpty() |
| 53 | 53 | { |
| 54 | - return ! $this->isEmpty(); |
|
| 54 | + return !$this->isEmpty(); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | [$job, $callback] = [$this->firstClosureParameterType($job), $job]; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - $this->assertPushed($job, function ($job, $pushedQueue) use ($callback, $queue) { |
|
| 77 | + $this->assertPushed($job, function($job, $pushedQueue) use ($callback, $queue) { |
|
| 78 | 78 | if ($pushedQueue !== $queue) { |
| 79 | 79 | return false; |
| 80 | 80 | } |
@@ -135,12 +135,12 @@ discard block |
||
| 135 | 135 | */ |
| 136 | 136 | protected function assertPushedWithChainOfObjects($job, $expectedChain, $callback) |
| 137 | 137 | { |
| 138 | - $chain = collect($expectedChain)->map(function ($job) { |
|
| 138 | + $chain = collect($expectedChain)->map(function($job) { |
|
| 139 | 139 | return serialize($job); |
| 140 | 140 | })->all(); |
| 141 | 141 | |
| 142 | 142 | PHPUnit::assertTrue( |
| 143 | - $this->pushed($job, $callback)->filter(function ($job) use ($chain) { |
|
| 143 | + $this->pushed($job, $callback)->filter(function($job) use ($chain) { |
|
| 144 | 144 | return $job->chained == $chain; |
| 145 | 145 | })->isNotEmpty(), |
| 146 | 146 | 'The expected chain was not pushed.' |
@@ -157,11 +157,11 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | protected function assertPushedWithChainOfClasses($job, $expectedChain, $callback) |
| 159 | 159 | { |
| 160 | - $matching = $this->pushed($job, $callback)->map->chained->map(function ($chain) { |
|
| 161 | - return collect($chain)->map(function ($job) { |
|
| 160 | + $matching = $this->pushed($job, $callback)->map->chained->map(function($chain) { |
|
| 161 | + return collect($chain)->map(function($job) { |
|
| 162 | 162 | return get_class(unserialize($job)); |
| 163 | 163 | }); |
| 164 | - })->filter(function ($chain) use ($expectedChain) { |
|
| 164 | + })->filter(function($chain) use ($expectedChain) { |
|
| 165 | 165 | return $chain->all() === $expectedChain; |
| 166 | 166 | }); |
| 167 | 167 | |
@@ -178,8 +178,8 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | protected function isChainOfObjects($chain) |
| 180 | 180 | { |
| 181 | - return ! collect($chain)->contains(function ($job) { |
|
| 182 | - return ! is_object($job); |
|
| 181 | + return !collect($chain)->contains(function($job) { |
|
| 182 | + return !is_object($job); |
|
| 183 | 183 | }); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -221,15 +221,15 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | public function pushed($job, $callback = null) |
| 223 | 223 | { |
| 224 | - if (! $this->hasPushed($job)) { |
|
| 224 | + if (!$this->hasPushed($job)) { |
|
| 225 | 225 | return collect(); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - $callback = $callback ?: function () { |
|
| 228 | + $callback = $callback ?: function() { |
|
| 229 | 229 | return true; |
| 230 | 230 | }; |
| 231 | 231 | |
| 232 | - return collect($this->jobs[$job])->filter(function ($data) use ($callback) { |
|
| 232 | + return collect($this->jobs[$job])->filter(function($data) use ($callback) { |
|
| 233 | 233 | return $callback($data['job'], $data['queue']); |
| 234 | 234 | })->pluck('job'); |
| 235 | 235 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | */ |
| 243 | 243 | public function hasPushed($job) |
| 244 | 244 | { |
| 245 | - return isset($this->jobs[$job]) && ! empty($this->jobs[$job]); |
|
| 245 | + return isset($this->jobs[$job]) && !empty($this->jobs[$job]); |
|
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /** |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | public function size($queue = null) |
| 266 | 266 | { |
| 267 | - return collect($this->jobs)->flatten(1)->filter(function ($job) use ($queue) { |
|
| 267 | + return collect($this->jobs)->flatten(1)->filter(function($job) use ($queue) { |
|
| 268 | 268 | return $job['queue'] === $queue; |
| 269 | 269 | })->count(); |
| 270 | 270 | } |
@@ -279,12 +279,12 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | if ($command instanceof Closure) { |
| 281 | 281 | [$command, $callback] = [$this->firstClosureParameterType($command), $command]; |
| 282 | - } elseif (! is_string($command)) { |
|
| 282 | + } elseif (!is_string($command)) { |
|
| 283 | 283 | $instance = $command; |
| 284 | 284 | |
| 285 | 285 | $command = get_class($instance); |
| 286 | 286 | |
| 287 | - $callback = function ($job) use ($instance) { |
|
| 287 | + $callback = function($job) use ($instance) { |
|
| 288 | 288 | return serialize($this->resetChainPropertiesToDefaults($job)) === serialize($instance); |
| 289 | 289 | }; |
| 290 | 290 | } |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | */ |
| 313 | 313 | protected function resetChainPropertiesToDefaults($job) |
| 314 | 314 | { |
| 315 | - return tap(clone $job, function ($job) { |
|
| 315 | + return tap(clone $job, function($job) { |
|
| 316 | 316 | $job->chainConnection = null; |
| 317 | 317 | $job->chainQueue = null; |
| 318 | 318 | $job->chainCatchCallbacks = null; |
@@ -351,12 +351,12 @@ discard block |
||
| 351 | 351 | */ |
| 352 | 352 | protected function assertDispatchedWithChainOfObjects($command, $expectedChain, $callback) |
| 353 | 353 | { |
| 354 | - $chain = collect($expectedChain)->map(function ($job) { |
|
| 354 | + $chain = collect($expectedChain)->map(function($job) { |
|
| 355 | 355 | return serialize($job); |
| 356 | 356 | })->all(); |
| 357 | 357 | |
| 358 | 358 | PHPUnit::assertTrue( |
| 359 | - $this->dispatched($command, $callback)->filter(function ($job) use ($chain) { |
|
| 359 | + $this->dispatched($command, $callback)->filter(function($job) use ($chain) { |
|
| 360 | 360 | return $job->chained == $chain; |
| 361 | 361 | })->isNotEmpty(), |
| 362 | 362 | 'The expected chain was not dispatched.' |
@@ -373,11 +373,11 @@ discard block |
||
| 373 | 373 | */ |
| 374 | 374 | protected function assertDispatchedWithChainOfClasses($command, $expectedChain, $callback) |
| 375 | 375 | { |
| 376 | - $matching = $this->dispatched($command, $callback)->map->chained->map(function ($chain) { |
|
| 377 | - return collect($chain)->map(function ($job) { |
|
| 376 | + $matching = $this->dispatched($command, $callback)->map->chained->map(function($chain) { |
|
| 377 | + return collect($chain)->map(function($job) { |
|
| 378 | 378 | return get_class(unserialize($job)); |
| 379 | 379 | }); |
| 380 | - })->filter(function ($chain) use ($expectedChain) { |
|
| 380 | + })->filter(function($chain) use ($expectedChain) { |
|
| 381 | 381 | return $chain->all() === $expectedChain; |
| 382 | 382 | }); |
| 383 | 383 | |
@@ -394,8 +394,8 @@ discard block |
||
| 394 | 394 | */ |
| 395 | 395 | protected function isChainOfObjects($chain) |
| 396 | 396 | { |
| 397 | - return ! collect($chain)->contains(function ($job) { |
|
| 398 | - return ! is_object($job); |
|
| 397 | + return !collect($chain)->contains(function($job) { |
|
| 398 | + return !is_object($job); |
|
| 399 | 399 | }); |
| 400 | 400 | } |
| 401 | 401 | |
@@ -435,15 +435,15 @@ discard block |
||
| 435 | 435 | */ |
| 436 | 436 | public function dispatched($command, $callback = null) |
| 437 | 437 | { |
| 438 | - if (! $this->hasDispatched($command)) { |
|
| 438 | + if (!$this->hasDispatched($command)) { |
|
| 439 | 439 | return collect(); |
| 440 | 440 | } |
| 441 | 441 | |
| 442 | - $callback = $callback ?: function () { |
|
| 442 | + $callback = $callback ?: function() { |
|
| 443 | 443 | return true; |
| 444 | 444 | }; |
| 445 | 445 | |
| 446 | - return collect($this->commands[$command])->filter(function ($command) use ($callback) { |
|
| 446 | + return collect($this->commands[$command])->filter(function($command) use ($callback) { |
|
| 447 | 447 | return $callback($command); |
| 448 | 448 | }); |
| 449 | 449 | } |
@@ -457,15 +457,15 @@ discard block |
||
| 457 | 457 | */ |
| 458 | 458 | public function dispatchedSync(string $command, $callback = null) |
| 459 | 459 | { |
| 460 | - if (! $this->hasDispatchedSync($command)) { |
|
| 460 | + if (!$this->hasDispatchedSync($command)) { |
|
| 461 | 461 | return collect(); |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | - $callback = $callback ?: function () { |
|
| 464 | + $callback = $callback ?: function() { |
|
| 465 | 465 | return true; |
| 466 | 466 | }; |
| 467 | 467 | |
| 468 | - return collect($this->commandsSync[$command])->filter(function ($command) use ($callback) { |
|
| 468 | + return collect($this->commandsSync[$command])->filter(function($command) use ($callback) { |
|
| 469 | 469 | return $callback($command); |
| 470 | 470 | }); |
| 471 | 471 | } |
@@ -479,15 +479,15 @@ discard block |
||
| 479 | 479 | */ |
| 480 | 480 | public function dispatchedAfterResponse(string $command, $callback = null) |
| 481 | 481 | { |
| 482 | - if (! $this->hasDispatchedAfterResponse($command)) { |
|
| 482 | + if (!$this->hasDispatchedAfterResponse($command)) { |
|
| 483 | 483 | return collect(); |
| 484 | 484 | } |
| 485 | 485 | |
| 486 | - $callback = $callback ?: function () { |
|
| 486 | + $callback = $callback ?: function() { |
|
| 487 | 487 | return true; |
| 488 | 488 | }; |
| 489 | 489 | |
| 490 | - return collect($this->commandsAfterResponse[$command])->filter(function ($command) use ($callback) { |
|
| 490 | + return collect($this->commandsAfterResponse[$command])->filter(function($command) use ($callback) { |
|
| 491 | 491 | return $callback($command); |
| 492 | 492 | }); |
| 493 | 493 | } |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | return collect(); |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | - return collect($this->batches)->filter(function ($batch) use ($callback) { |
|
| 507 | + return collect($this->batches)->filter(function($batch) use ($callback) { |
|
| 508 | 508 | return $callback($batch); |
| 509 | 509 | }); |
| 510 | 510 | } |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | */ |
| 518 | 518 | public function hasDispatched($command) |
| 519 | 519 | { |
| 520 | - return isset($this->commands[$command]) && ! empty($this->commands[$command]); |
|
| 520 | + return isset($this->commands[$command]) && !empty($this->commands[$command]); |
|
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | /** |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | */ |
| 529 | 529 | public function hasDispatchedSync($command) |
| 530 | 530 | { |
| 531 | - return isset($this->commandsSync[$command]) && ! empty($this->commandsSync[$command]); |
|
| 531 | + return isset($this->commandsSync[$command]) && !empty($this->commandsSync[$command]); |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | /** |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | */ |
| 540 | 540 | public function hasDispatchedAfterResponse($command) |
| 541 | 541 | { |
| 542 | - return isset($this->commandsAfterResponse[$command]) && ! empty($this->commandsAfterResponse[$command]); |
|
| 542 | + return isset($this->commandsAfterResponse[$command]) && !empty($this->commandsAfterResponse[$command]); |
|
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | /** |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | } |
| 683 | 683 | |
| 684 | 684 | return collect($this->jobsToFake) |
| 685 | - ->filter(function ($job) use ($command) { |
|
| 685 | + ->filter(function($job) use ($command) { |
|
| 686 | 686 | return $job instanceof Closure |
| 687 | 687 | ? $job($command) |
| 688 | 688 | : $job === get_class($command); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | { |
| 170 | 170 | $actualCount = collect($this->notifications) |
| 171 | 171 | ->flatten(1) |
| 172 | - ->reduce(function ($count, $sent) use ($notification) { |
|
| 172 | + ->reduce(function($count, $sent) use ($notification) { |
|
| 173 | 173 | return $count + count($sent[$notification] ?? []); |
| 174 | 174 | }, 0); |
| 175 | 175 | |
@@ -203,17 +203,17 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | public function sent($notifiable, $notification, $callback = null) |
| 205 | 205 | { |
| 206 | - if (! $this->hasSent($notifiable, $notification)) { |
|
| 206 | + if (!$this->hasSent($notifiable, $notification)) { |
|
| 207 | 207 | return collect(); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - $callback = $callback ?: function () { |
|
| 210 | + $callback = $callback ?: function() { |
|
| 211 | 211 | return true; |
| 212 | 212 | }; |
| 213 | 213 | |
| 214 | 214 | $notifications = collect($this->notificationsFor($notifiable, $notification)); |
| 215 | 215 | |
| 216 | - return $notifications->filter(function ($arguments) use ($callback) { |
|
| 216 | + return $notifications->filter(function($arguments) use ($callback) { |
|
| 217 | 217 | return $callback(...array_values($arguments)); |
| 218 | 218 | })->pluck('notification'); |
| 219 | 219 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | public function hasSent($notifiable, $notification) |
| 229 | 229 | { |
| 230 | - return ! empty($this->notificationsFor($notifiable, $notification)); |
|
| 230 | + return !empty($this->notificationsFor($notifiable, $notification)); |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
@@ -264,12 +264,12 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | public function sendNow($notifiables, $notification, array $channels = null) |
| 266 | 266 | { |
| 267 | - if (! $notifiables instanceof Collection && ! is_array($notifiables)) { |
|
| 267 | + if (!$notifiables instanceof Collection && !is_array($notifiables)) { |
|
| 268 | 268 | $notifiables = [$notifiables]; |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | 271 | foreach ($notifiables as $notifiable) { |
| 272 | - if (! $notification->id) { |
|
| 272 | + if (!$notification->id) { |
|
| 273 | 273 | $notification->id = Str::uuid()->toString(); |
| 274 | 274 | } |
| 275 | 275 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | if (method_exists($notification, 'shouldSend')) { |
| 279 | 279 | $notifiableChannels = array_filter( |
| 280 | 280 | $notifiableChannels, |
| 281 | - function ($channel) use ($notification, $notifiable) { |
|
| 281 | + function($channel) use ($notification, $notifiable) { |
|
| 282 | 282 | return $notification->shouldSend($notifiable, $channel) !== false; |
| 283 | 283 | } |
| 284 | 284 | ); |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | 'notification' => $notification, |
| 293 | 293 | 'channels' => $notifiableChannels, |
| 294 | 294 | 'notifiable' => $notifiable, |
| 295 | - 'locale' => $notification->locale ?? $this->locale ?? value(function () use ($notifiable) { |
|
| 295 | + 'locale' => $notification->locale ?? $this->locale ?? value(function() use ($notifiable) { |
|
| 296 | 296 | if ($notifiable instanceof HasLocalePreference) { |
| 297 | 297 | return $notifiable->preferredLocale(); |
| 298 | 298 | } |