@@ -8,14 +8,14 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | class Placeholder { |
| 10 | 10 | private static $instance; |
| 11 | - private function __construct(){} |
|
| 11 | + private function __construct() {} |
|
| 12 | 12 | public static function get() |
| 13 | 13 | { |
| 14 | - if(static::$instance === null) |
|
| 14 | + if (static::$instance === null) |
|
| 15 | 15 | static::$instance = new Placeholder; |
| 16 | 16 | return static::$instance; |
| 17 | 17 | } |
| 18 | - public function __toString(){ |
|
| 18 | + public function __toString() { |
|
| 19 | 19 | return '__'; |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | function pipe() { |
| 96 | 96 | $fns = func_get_args(); |
| 97 | - if(count($fns) < 1) |
|
| 97 | + if (count($fns) < 1) |
|
| 98 | 98 | return identity(); |
| 99 | - return curry(function () use ($fns) { |
|
| 99 | + return curry(function() use ($fns) { |
|
| 100 | 100 | $result = _apply(array_shift($fns), func_get_args()); |
| 101 | 101 | foreach ($fns as $fn) { |
| 102 | 102 | $result = $fn($result); |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | static $comparator = false; |
| 266 | 266 | $comparator = $comparator ?: curry(function($fn) { |
| 267 | 267 | return function($a, $b) use($fn) { |
| 268 | - if ($fn($a, $b)) return -1; |
|
| 268 | + if ($fn($a, $b)) return - 1; |
|
| 269 | 269 | if ($fn($b, $a)) return 1; |
| 270 | 270 | return 0; |
| 271 | 271 | }; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | if (length($parts) < 2) |
| 168 | 168 | _stream_throw_error('invalid-signature', $text); |
| 169 | 169 | |
| 170 | - return reduce(function($result, $part){ |
|
| 170 | + return reduce(function($result, $part) { |
|
| 171 | 171 | return chain(function($item) use($result){ |
| 172 | 172 | return map(append($item), $result); |
| 173 | 173 | }, $part); |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | function _stream_ensure_type() { |
| 199 | 199 | $ensureType = function($signature, $type) { |
| 200 | - if (! contains($type, _stream_types())) |
|
| 200 | + if (!contains($type, _stream_types())) |
|
| 201 | 201 | _stream_throw_error('invalid-signature', $signature); |
| 202 | 202 | return $type; |
| 203 | 203 | }; |