@@ -37,11 +37,11 @@ |
||
37 | 37 | $status = opcache_get_status(); |
38 | 38 | if (!empty($status)) { |
39 | 39 | $path = dirname(dirname($this->request->getFilename())); |
40 | - $scripts = array_filter($status['scripts'], function ($val) use ($path) { |
|
40 | + $scripts = array_filter($status['scripts'], function($val) use ($path) { |
|
41 | 41 | return strpos($val['full_path'], $path) !== false; |
42 | 42 | }); |
43 | 43 | $status['scripts'] = array_values($scripts); |
44 | - $bytes = array_reduce($status['scripts'], function ($stack, $val) { |
|
44 | + $bytes = array_reduce($status['scripts'], function($stack, $val) { |
|
45 | 45 | return $stack + $val['memory_consumption']; |
46 | 46 | }); |
47 | 47 | $scriptCount = count($scripts); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | if (!file_exists($filename)) { |
102 | 102 | $crypt = new Crypt($this->config); |
103 | 103 | $accounts = $this->config->getSettings(Config::_ACCOUNTS); |
104 | - $accounts = array_map(function ($acc) use ($crypt) { |
|
104 | + $accounts = array_map(function($acc) use ($crypt) { |
|
105 | 105 | $acc[self::_PASSWORD] = $crypt->encrypt( |
106 | 106 | $acc[self::_PASSWORD], |
107 | 107 | true |
@@ -68,7 +68,7 @@ |
||
68 | 68 | { |
69 | 69 | if (is_null($this->instance)) { |
70 | 70 | try { |
71 | - $this->instance = new Redis(); |
|
71 | + $this->instance = new Redis(); |
|
72 | 72 | $cresult = @$this->instance->connect( |
73 | 73 | $this->config[self::_HOST], |
74 | 74 | $this->config[self::_PORT] |
@@ -47,7 +47,7 @@ |
||
47 | 47 | 'exclude' => [ |
48 | 48 | 'auth/login', 'stat/opcache', |
49 | 49 | 'restful', 'restful/index', |
50 | - 'test/pokerelay' , 'test/redis' |
|
50 | + 'test/pokerelay', 'test/redis' |
|
51 | 51 | ], |
52 | 52 | ], |
53 | 53 | After::class => [ |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $layers = array_reverse($this->layers); |
68 | 68 | $completeMiddleware = array_reduce( |
69 | 69 | $layers, |
70 | - function ($nextLayer, $layer) { |
|
70 | + function($nextLayer, $layer) { |
|
71 | 71 | return $this->createLayer($nextLayer, $layer); |
72 | 72 | }, |
73 | 73 | $coreFunction |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | protected function createCoreFunction(Closure $core): Closure |
97 | 97 | { |
98 | - return function ($object) use ($core) { |
|
98 | + return function($object) use ($core) { |
|
99 | 99 | return $core($object); |
100 | 100 | }; |
101 | 101 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | protected function createLayer(Closure $nextLayer, ILayer $layer): Closure |
112 | 112 | { |
113 | - return function ($object) use ($nextLayer, $layer) { |
|
113 | + return function($object) use ($nextLayer, $layer) { |
|
114 | 114 | return $layer->peel($object, $nextLayer); |
115 | 115 | }; |
116 | 116 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | public function getRaw(): array |
84 | 84 | { |
85 | 85 | return array_map( |
86 | - function ($key, $val) { |
|
86 | + function($key, $val) { |
|
87 | 87 | return $key . ': ' . $val; |
88 | 88 | }, |
89 | 89 | array_keys($this->headers), |
@@ -159,7 +159,7 @@ |
||
159 | 159 | { |
160 | 160 | if ($this->constructable($serviceName)) { |
161 | 161 | if (!$this->hasService($serviceName)) { |
162 | - $args = array_map(function ($value) { |
|
162 | + $args = array_map(function($value) { |
|
163 | 163 | if (is_array($value)) { |
164 | 164 | $values = []; |
165 | 165 | foreach ($value as $i) { |
@@ -54,7 +54,7 @@ |
||
54 | 54 | public function getExpr(): array |
55 | 55 | { |
56 | 56 | $patterns = array_map( |
57 | - function (Route $i) { |
|
57 | + function(Route $i) { |
|
58 | 58 | return $i->getExpr(); |
59 | 59 | }, |
60 | 60 | $this->routes |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | (new Middleware())->layer($this->middlewares)->peel( |
251 | 251 | $this->container, |
252 | - function ($container) { |
|
252 | + function($container) { |
|
253 | 253 | $this->execute($this->router->getParams()); |
254 | 254 | return $container; |
255 | 255 | } |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | protected function setActions() |
340 | 340 | { |
341 | 341 | $methods = $this->getFinalMethods(); |
342 | - $methodsName = array_map(function ($method) { |
|
342 | + $methodsName = array_map(function($method) { |
|
343 | 343 | return $method->name; |
344 | 344 | }, $methods); |
345 | 345 | $this->actions = array_merge($methodsName, ['preflight']); |