@@ -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 | } |
@@ -11,8 +11,9 @@ |
||
11 | 11 | private function __construct(){} |
12 | 12 | public static function get() |
13 | 13 | { |
14 | - if(static::$instance === null) |
|
15 | - static::$instance = new Placeholder; |
|
14 | + if(static::$instance === null) { |
|
15 | + static::$instance = new Placeholder; |
|
16 | + } |
|
16 | 17 | return static::$instance; |
17 | 18 | } |
18 | 19 | public function __toString(){ |
@@ -2,8 +2,7 @@ |
||
2 | 2 | |
3 | 3 | function numberOfArgs($fn) { |
4 | 4 | $reflector = is_array($fn) ? |
5 | - new ReflectionMethod($fn[0], $fn[1]) : |
|
6 | - new ReflectionFunction($fn); |
|
5 | + new ReflectionMethod($fn[0], $fn[1]) : new ReflectionFunction($fn); |
|
7 | 6 | return $reflector->getNumberOfParameters(); |
8 | 7 | } |
9 | 8 |
@@ -14,8 +14,9 @@ |
||
14 | 14 | function curriedFunction($fn, $argsCount, $boundArgs = []) { |
15 | 15 | return function() use($fn, $argsCount, $boundArgs) { |
16 | 16 | $boundArgs = array_merge($boundArgs, func_get_args()); |
17 | - if (count($boundArgs) >= $argsCount) |
|
18 | - return call_user_func_array($fn, $boundArgs); |
|
17 | + if (count($boundArgs) >= $argsCount) { |
|
18 | + return call_user_func_array($fn, $boundArgs); |
|
19 | + } |
|
19 | 20 | return curriedFunction($fn, $argsCount, $boundArgs); |
20 | 21 | }; |
21 | 22 | } |