@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * This file is part of indragunawan/rest-service package. |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * This file is part of indragunawan/rest-service package. |
@@ -128,13 +128,13 @@ discard block |
||
| 128 | 128 | { |
| 129 | 129 | // Modify provided callbacks to track results. |
| 130 | 130 | $results = []; |
| 131 | - $options['fulfilled'] = function ($v, $k) use (&$results, $options) { |
|
| 131 | + $options['fulfilled'] = function($v, $k) use (&$results, $options) { |
|
| 132 | 132 | if (isset($options['fulfilled'])) { |
| 133 | 133 | $options['fulfilled']($v, $k); |
| 134 | 134 | } |
| 135 | 135 | $results[$k] = $v; |
| 136 | 136 | }; |
| 137 | - $options['rejected'] = function ($v, $k) use (&$results, $options) { |
|
| 137 | + $options['rejected'] = function($v, $k) use (&$results, $options) { |
|
| 138 | 138 | if (isset($options['rejected'])) { |
| 139 | 139 | $options['rejected']($v, $k); |
| 140 | 140 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | // Execute multiple commands synchronously, then sort and return the results. |
| 145 | 145 | return $this->executeAllAsync($commands, $options) |
| 146 | - ->then(function () use (&$results) { |
|
| 146 | + ->then(function() use (&$results) { |
|
| 147 | 147 | ksort($results); |
| 148 | 148 | |
| 149 | 149 | return $results; |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | // Convert the iterator of commands to a generator of promises. |
| 165 | 165 | $commands = Promise\iter_for($commands); |
| 166 | - $promises = function () use ($commands) { |
|
| 166 | + $promises = function() use ($commands) { |
|
| 167 | 167 | foreach ($commands as $key => $command) { |
| 168 | 168 | if (!$command instanceof CommandInterface) { |
| 169 | 169 | throw new \InvalidArgumentException('The iterator must ' |
@@ -214,8 +214,8 @@ discard block |
||
| 214 | 214 | */ |
| 215 | 215 | private function createCommandHandler() |
| 216 | 216 | { |
| 217 | - return function (CommandInterface $command) { |
|
| 218 | - return Promise\coroutine(function () use ($command) { |
|
| 217 | + return function(CommandInterface $command) { |
|
| 218 | + return Promise\coroutine(function() use ($command) { |
|
| 219 | 219 | // Prepare the HTTP options. |
| 220 | 220 | $opts = $command['@http'] ?: []; |
| 221 | 221 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * This file is part of indragunawan/rest-service package. |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * This file is part of indragunawan/rest-service package. |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * This file is part of indragunawan/rest-service package. |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | * This file is part of indragunawan/rest-service package. |