@@ -69,7 +69,6 @@ |
||
69 | 69 | /** |
70 | 70 | * {@inheritdoc} |
71 | 71 | * |
72 | - * @param Isolator|null $isolator |
|
73 | 72 | */ |
74 | 73 | public function modify( |
75 | 74 | EnvironmentInterface $environment, |
@@ -201,8 +201,8 @@ |
||
201 | 201 | EnvironmentInterface $environment, |
202 | 202 | ViewSource $view |
203 | 203 | ): string { |
204 | - $filename = "{$view->getNamespace()}.{$view->getName()}.eval." . spl_object_hash($this) . '.php'; |
|
204 | + $filename = "{$view->getNamespace()}.{$view->getName()}.eval.".spl_object_hash($this).'.php'; |
|
205 | 205 | |
206 | - return $environment->cacheDirectory() . $filename; |
|
206 | + return $environment->cacheDirectory().$filename; |
|
207 | 207 | } |
208 | 208 | } |
209 | 209 | \ No newline at end of file |
@@ -76,7 +76,7 @@ |
||
76 | 76 | return (string)$request->getHeaderLine(self::HEADER); |
77 | 77 | } |
78 | 78 | |
79 | - $data = $request->getParsedBody(); |
|
79 | + $data = $request->getParsedBody(); |
|
80 | 80 | if (is_array($data) && isset($data[self::PARAMETER])) { |
81 | 81 | if (is_string($data[self::PARAMETER])) { |
82 | 82 | return (string)$data[self::PARAMETER]; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | |
67 | 67 | $route = $this; |
68 | 68 | |
69 | - return function (Request $request, Response $response) use ($route) { |
|
69 | + return function(Request $request, Response $response) use ($route) { |
|
70 | 70 | list($controller, $action) = explode(':', str_replace('::', ':', $route->target)); |
71 | 71 | |
72 | 72 | if ($action == self::DYNAMIC_ACTION) { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | { |
124 | 124 | $route = $this; |
125 | 125 | |
126 | - return function (Request $request, Response $response) use ($route) { |
|
126 | + return function(Request $request, Response $response) use ($route) { |
|
127 | 127 | $matches = $route->getMatches(); |
128 | 128 | |
129 | 129 | //Due we are expecting part of class name we can remove some garbage (see to-do below) |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | //Aliased |
134 | 134 | $controller = $route->controllers[$controller]; |
135 | 135 | } else { |
136 | - $controller = Inflector::classify($controller) . $route->postfix; |
|
136 | + $controller = Inflector::classify($controller).$route->postfix; |
|
137 | 137 | $controller = "{$route->namespace}\\{$controller}"; |
138 | 138 | } |
139 | 139 |
@@ -116,7 +116,7 @@ |
||
116 | 116 | $response = $response->withHeader('Content-Length', (string)$stream->getSize()); |
117 | 117 | $response = $response->withHeader( |
118 | 118 | 'Content-Disposition', |
119 | - 'attachment; filename="' . addcslashes($name, '"') . '"' |
|
119 | + 'attachment; filename="'.addcslashes($name, '"').'"' |
|
120 | 120 | ); |
121 | 121 | |
122 | 122 | return $response->withBody($stream); |
@@ -72,6 +72,6 @@ |
||
72 | 72 | protected function defineAction(Request $request, array $parameters, string $action) |
73 | 73 | { |
74 | 74 | //methodAction [putPost, getPost] |
75 | - return strtolower($request->getMethod()) . ucfirst($action); |
|
75 | + return strtolower($request->getMethod()).ucfirst($action); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | \ No newline at end of file |
@@ -143,7 +143,7 @@ |
||
143 | 143 | if (empty($path)) { |
144 | 144 | return '/'; |
145 | 145 | } elseif ($path[0] !== '/') { |
146 | - return '/' . $path; |
|
146 | + return '/'.$path; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | return $path; |
@@ -246,7 +246,7 @@ |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | foreach (array_keys($iteration) as $key) { |
249 | - $result[$key] = $prefix . '.' . $key; |
|
249 | + $result[$key] = $prefix.'.'.$key; |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | return $result; |
@@ -44,7 +44,7 @@ |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | //Action should include prefix and be always specified |
47 | - $method = static::ACTION_PREFIX . ($action ?? $this->defaultAction) . static::ACTION_POSTFIX; |
|
47 | + $method = static::ACTION_PREFIX.($action ?? $this->defaultAction).static::ACTION_POSTFIX; |
|
48 | 48 | if (!method_exists($this, $method)) { |
49 | 49 | throw new ControllerException( |
50 | 50 | "No such action '{$action}'", ControllerException::BAD_ACTION |