@@ -9,12 +9,12 @@ |
||
| 9 | 9 | |
| 10 | 10 | require __DIR__ . '/../vendor/autoload.php'; |
| 11 | 11 | |
| 12 | -$constant = function (string $string) { |
|
| 13 | - return function () use ($string) {return $string;}; |
|
| 12 | +$constant = function(string $string) { |
|
| 13 | + return function() use ($string) {return $string; }; |
|
| 14 | 14 | }; |
| 15 | 15 | |
| 16 | 16 | // this function return a function with signature () => () |
| 17 | -$echoer = function (string $string) use ($constant) { |
|
| 17 | +$echoer = function(string $string) use ($constant) { |
|
| 18 | 18 | return Compose::pieces( |
| 19 | 19 | $constant($string), |
| 20 | 20 | new Echo_() |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | $compose = Compose::pieces( |
| 14 | 14 | new Argv(), |
| 15 | - function (array $args) {return implode($args);}, |
|
| 15 | + function(array $args) {return implode($args); }, |
|
| 16 | 16 | new Echo_() |
| 17 | 17 | ); |
| 18 | 18 | |
@@ -12,12 +12,12 @@ |
||
| 12 | 12 | require __DIR__ . '/../vendor/autoload.php'; |
| 13 | 13 | |
| 14 | 14 | $readOrQuit = Conditional::ifThenElse( |
| 15 | - function (string $prompt) {return $prompt === 'quit';}, |
|
| 15 | + function(string $prompt) {return $prompt === 'quit'; }, |
|
| 16 | 16 | new Exit_(), |
| 17 | 17 | new Readline() |
| 18 | 18 | ); |
| 19 | 19 | |
| 20 | -$readUntilQuit = Compose::iterable((function () use ($readOrQuit) { |
|
| 20 | +$readUntilQuit = Compose::iterable((function() use ($readOrQuit) { |
|
| 21 | 21 | while (true) { |
| 22 | 22 | yield $readOrQuit; |
| 23 | 23 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Marcosh\EffectorExample; |
| 6 | 6 | |
@@ -10,12 +10,12 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/../vendor/autoload.php'; |
| 12 | 12 | |
| 13 | -$sumThree = function ($a, $b, $c) { |
|
| 13 | +$sumThree = function($a, $b, $c) { |
|
| 14 | 14 | return $a + $b + $c; |
| 15 | 15 | }; |
| 16 | 16 | |
| 17 | -$const = function ($x) { |
|
| 18 | - return function () use ($x) { |
|
| 17 | +$const = function($x) { |
|
| 18 | + return function() use ($x) { |
|
| 19 | 19 | return $x; |
| 20 | 20 | }; |
| 21 | 21 | }; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | $compose = Compose::pieces( |
| 26 | 26 | $combine, |
| 27 | - function (int $int) {return (string) $int . PHP_EOL;}, |
|
| 27 | + function(int $int) {return (string) $int . PHP_EOL; }, |
|
| 28 | 28 | new Echo_() |
| 29 | 29 | ); |
| 30 | 30 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | // we map Argv with implode |
| 14 | 14 | $implodeArgv = Compose::pieces( |
| 15 | 15 | new Argv(), |
| 16 | - function (array $strings) {return implode($strings) . PHP_EOL;} |
|
| 16 | + function(array $strings) {return implode($strings) . PHP_EOL; } |
|
| 17 | 17 | ); |
| 18 | 18 | |
| 19 | 19 | $compose = Compose::pieces( |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Marcosh\Effector; |
| 6 | 6 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $otherParameters = array_slice($this->parameters, 1); |
| 45 | 45 | |
| 46 | 46 | return self::lazyParameters( |
| 47 | - function (... $parameters) use ($nextParameter, $parameterInput) { |
|
| 47 | + function(... $parameters) use ($nextParameter, $parameterInput) { |
|
| 48 | 48 | return ($this->function)( |
| 49 | 49 | $nextParameter(... $parameterInput), |
| 50 | 50 | ... $parameters |
@@ -12,10 +12,10 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function __invoke( |
| 14 | 14 | string $fileName, |
| 15 | - ?bool $useIncludePath = false, |
|
| 16 | - ?resource $context = null, |
|
| 15 | + ? bool $useIncludePath = false, |
|
| 16 | + ? resource $context = null, |
|
| 17 | 17 | int $offset = 0, |
| 18 | - ?int $maxLength = null |
|
| 18 | + ? int $maxLength = null |
|
| 19 | 19 | ) { |
| 20 | 20 | if (null === $maxLength) { |
| 21 | 21 | return file_get_contents( |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Marcosh\Effector\Effect\File; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Marcosh\Effector\Effect\Http; |
| 6 | 6 | |