@@ -16,8 +16,9 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function startMeasure(string $name): void |
18 | 18 | { |
19 | - if (App::$Debug) |
|
20 | - App::$Debug->startMeasure($name); |
|
19 | + if (App::$Debug) { |
|
20 | + App::$Debug->startMeasure($name); |
|
21 | + } |
|
21 | 22 | } |
22 | 23 | |
23 | 24 | /** |
@@ -26,7 +27,8 @@ discard block |
||
26 | 27 | */ |
27 | 28 | public function stopMeasure(string $name): void |
28 | 29 | { |
29 | - if (App::$Debug) |
|
30 | - App::$Debug->stopMeasure($name); |
|
30 | + if (App::$Debug) { |
|
31 | + App::$Debug->stopMeasure($name); |
|
32 | + } |
|
31 | 33 | } |
32 | 34 | } |
33 | 35 | \ No newline at end of file |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | try { |
189 | 189 | /** @var \Ffcms\Core\Arch\Controller $callClass */ |
190 | 190 | $callClass = null; |
191 | - $callMethod = 'action' . self::$Request->getAction(); |
|
191 | + $callMethod = 'action'.self::$Request->getAction(); |
|
192 | 192 | |
193 | 193 | // founded callback injection alias |
194 | 194 | if (self::$Request->getCallbackAlias() !== false) { |
@@ -196,16 +196,16 @@ discard block |
||
196 | 196 | if (class_exists($cName)) { |
197 | 197 | $callClass = new $cName; |
198 | 198 | } else { |
199 | - throw new NotFoundException('Callback alias of class "' . App::$Security->strip_tags($cName) . '" is not founded'); |
|
199 | + throw new NotFoundException('Callback alias of class "'.App::$Security->strip_tags($cName).'" is not founded'); |
|
200 | 200 | } |
201 | 201 | } else { // typical parsing of native apps |
202 | - $cName = '\Apps\Controller\\' . env_name . '\\' . self::$Request->getController(); |
|
202 | + $cName = '\Apps\Controller\\'.env_name.'\\'.self::$Request->getController(); |
|
203 | 203 | |
204 | 204 | // try to initialize class object |
205 | 205 | if (class_exists($cName)) { |
206 | 206 | $callClass = new $cName; |
207 | 207 | } else { |
208 | - throw new NotFoundException('Application can not be runned. Initialized class not founded: ' . App::$Security->strip_tags($cName)); |
|
208 | + throw new NotFoundException('Application can not be runned. Initialized class not founded: '.App::$Security->strip_tags($cName)); |
|
209 | 209 | } |
210 | 210 | } |
211 | 211 | |
@@ -238,10 +238,10 @@ discard block |
||
238 | 238 | ])); |
239 | 239 | } |
240 | 240 | |
241 | - $this->startMeasure($cName . '::' . $callMethod); |
|
241 | + $this->startMeasure($cName.'::'.$callMethod); |
|
242 | 242 | // make callback call to action in controller and get response |
243 | 243 | $actionResponse = call_user_func_array([$callClass, $callMethod], $actionQuery); |
244 | - $this->stopMeasure($cName . '::' . $callMethod); |
|
244 | + $this->stopMeasure($cName.'::'.$callMethod); |
|
245 | 245 | |
246 | 246 | if ($actionResponse !== null && !Str::likeEmpty($actionResponse)) { |
247 | 247 | // set response to controller property object |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | // build full compiled output html data |
252 | 252 | $html = $callClass->buildOutput(); |
253 | 253 | } else { |
254 | - throw new NotFoundException('Method "' . App::$Security->strip_tags($callMethod) . '()" not founded in "' . get_class($callClass) . '"'); |
|
254 | + throw new NotFoundException('Method "'.App::$Security->strip_tags($callMethod).'()" not founded in "'.get_class($callClass).'"'); |
|
255 | 255 | } |
256 | 256 | } catch (NotFoundException $e) { // catch exceptions and set output |
257 | 257 | $html = $e->display(); |