@@ -1,5 +1,5 @@ |
||
1 | 1 | {!! '<?'.'php' !!} |
2 | 2 | |
3 | 3 | @foreach($files as $item) |
4 | -require __DIR__.'/{{$item['ns']}}/{{$item['name']}}'; |
|
4 | +require __DIR__.'/{{$item['ns']}} / {{$item['name']}}'; |
|
5 | 5 | @endforeach |
@@ -55,7 +55,7 @@ |
||
55 | 55 | { |
56 | 56 | $tests = array_filter( |
57 | 57 | $suite->tests(), |
58 | - function ($testCase) { |
|
58 | + function($testCase) { |
|
59 | 59 | return $testCase instanceof TestCase; |
60 | 60 | } |
61 | 61 | ); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->getResolvedFn() |
43 | 43 | ); |
44 | 44 | |
45 | - return $buffer . $this->getDataSetAsString(); |
|
45 | + return $buffer.$this->getDataSetAsString(); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | protected function getResolvedFn(): string |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | return apply( |
88 | 88 | pipe([ |
89 | - map(function (\ReflectionMethod $method) { |
|
89 | + map(function(\ReflectionMethod $method) { |
|
90 | 90 | $comment = $method->getDocComment(); |
91 | 91 | |
92 | 92 | return [ |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | 'docBlock' => $this->docBlockFactory->create($comment), |
95 | 95 | ]; |
96 | 96 | }), |
97 | - reduce(function ($carry, array $method) { |
|
98 | - $category = (string)$this->getDocBlockTag('phlnCategory', $method['docBlock']->getTags()); |
|
97 | + reduce(function($carry, array $method) { |
|
98 | + $category = (string) $this->getDocBlockTag('phlnCategory', $method['docBlock']->getTags()); |
|
99 | 99 | |
100 | 100 | if (true === empty($category)) { |
101 | 101 | throw new \RuntimeException("Missing category for function: {$method['name']}"); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | private function getDocBlockTagsList(string $name, array $tags): array |
124 | 124 | { |
125 | - return filter(function (BaseTag $tag) use ($name) { |
|
125 | + return filter(function(BaseTag $tag) use ($name) { |
|
126 | 126 | return $name === $tag->getName(); |
127 | 127 | }, $tags); |
128 | 128 | } |
@@ -109,14 +109,14 @@ |
||
109 | 109 | ->depth(1); |
110 | 110 | |
111 | 111 | $files = collect($finder) |
112 | - ->map(function (SplFileInfo $file) { |
|
112 | + ->map(function(SplFileInfo $file) { |
|
113 | 113 | $pathname = $file->getRelativePathname(); |
114 | 114 | list ($ns, $name) = explode(DIRECTORY_SEPARATOR, $pathname); |
115 | 115 | |
116 | 116 | return compact('ns', 'name'); |
117 | 117 | }) |
118 | 118 | ->values() |
119 | - ->sort(function ($a, $b) { |
|
119 | + ->sort(function($a, $b) { |
|
120 | 120 | $byNs = strcmp($a['ns'], $b['ns']); |
121 | 121 | $byName = strcmp($a['name'], $b['name']); |
122 | 122 |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | private function getFunctions(): array |
113 | 113 | { |
114 | - $getName = function (callable $fn) { |
|
114 | + $getName = function(callable $fn) { |
|
115 | 115 | $reflection = new \ReflectionFunction($fn); |
116 | 116 | $parameters = $reflection->getParameters(); |
117 | 117 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | compose([keys, prop('user'), '\\get_defined_constants', T]), |
145 | 145 | $this->filters['phln_all'], |
146 | 146 | $this->filters['phln_noncurried'], |
147 | - map(function ($constName) { |
|
147 | + map(function($constName) { |
|
148 | 148 | return [ |
149 | 149 | 'fqn' => $constName, |
150 | 150 | 'name' => compose([last, split('\\')])($constName), |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | private function getParametersSource(array $parameters): array |
163 | 163 | { |
164 | - $mapParameters = function (\ReflectionParameter $parameter) { |
|
164 | + $mapParameters = function(\ReflectionParameter $parameter) { |
|
165 | 165 | $data = [ |
166 | 166 | 'name' => $parameter->getName(), |
167 | 167 | 'variadic' => $parameter->isVariadic(), |
@@ -186,12 +186,12 @@ discard block |
||
186 | 186 | { |
187 | 187 | $exportDefaultValue = cond([ |
188 | 188 | [equals([]), always('[]')], |
189 | - [T, function ($value) { |
|
189 | + [T, function($value) { |
|
190 | 190 | return var_export($value, true); |
191 | 191 | }], |
192 | 192 | ]); |
193 | 193 | |
194 | - $toSrc = function ($param) use ($exportDefaultValue) { |
|
194 | + $toSrc = function($param) use ($exportDefaultValue) { |
|
195 | 195 | $base = sprintf( |
196 | 196 | '%s%s$%s', |
197 | 197 | empty($param['type']) ? '' : "{$param['type']} ", |
@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | function cond(array $pairs): \Closure |
39 | 39 | { |
40 | - return function (... $args) use ($pairs) { |
|
40 | + return function(... $args) use ($pairs) { |
|
41 | 41 | $callPredicate = partial(apply, [__, $args]); |
42 | 42 | $pairMatchingArgs = compose([$callPredicate, nth(0)]); |
43 | 43 | $getTransformer = pipe([ |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | function |
@@ -34,9 +34,9 @@ |
||
34 | 34 | reduce(max, 0), |
35 | 35 | ]); |
36 | 36 | |
37 | - return curryN($getArity($predicates), function (... $values) use ($predicates) { |
|
37 | + return curryN($getArity($predicates), function(... $values) use ($predicates) { |
|
38 | 38 | return reduce( |
39 | - function ($carry, callable $p) use ($values) { |
|
39 | + function($carry, callable $p) use ($values) { |
|
40 | 40 | return (false === $carry) ? false : $p(...$values); |
41 | 41 | }, |
42 | 42 | true, |