@@ -54,8 +54,9 @@ discard block |
||
54 | 54 | |
55 | 55 | private function style_changed() { |
56 | 56 | foreach ($this->filenames as $filename) { |
57 | - if (!is_file($this->get_cache_name($filename))) |
|
58 | - return TRUE; |
|
57 | + if (!is_file($this->get_cache_name($filename))) { |
|
58 | + return TRUE; |
|
59 | + } |
|
59 | 60 | } |
60 | 61 | return FALSE; |
61 | 62 | } |
@@ -86,8 +87,9 @@ discard block |
||
86 | 87 | |
87 | 88 | // remove any old, lingering caches for this file |
88 | 89 | if ($dead_files = glob($this->get_cache_name($filename, TRUE), GLOB_NOESCAPE)) { |
89 | - foreach ($dead_files as $dead_file) |
|
90 | - unlink($dead_file); |
|
90 | + foreach ($dead_files as $dead_file) { |
|
91 | + unlink($dead_file); |
|
92 | + } |
|
91 | 93 | } |
92 | 94 | |
93 | 95 | $compressed = $this->compress(file_get_contents($filename)); |
@@ -85,7 +85,7 @@ |
||
85 | 85 | if ($characterDeficit == 0) { |
86 | 86 | //If the word is full and we're not short any characters, ignore the character |
87 | 87 | continue; |
88 | - }else |
|
88 | + } else |
|
89 | 89 | $characterDeficit--; //If we are short some characters, decrement the defecit and carry on with adding the character to the abbreviation |
90 | 90 | } |
91 | 91 | $abbreviation .= $currentChar; //Add the character to the abbreviation |
@@ -85,8 +85,10 @@ |
||
85 | 85 | if ($characterDeficit == 0) { |
86 | 86 | //If the word is full and we're not short any characters, ignore the character |
87 | 87 | continue; |
88 | - }else |
|
89 | - $characterDeficit--; //If we are short some characters, decrement the defecit and carry on with adding the character to the abbreviation |
|
88 | + } else { |
|
89 | + $characterDeficit--; |
|
90 | + } |
|
91 | + //If we are short some characters, decrement the defecit and carry on with adding the character to the abbreviation |
|
90 | 92 | } |
91 | 93 | $abbreviation .= $currentChar; //Add the character to the abbreviation |
92 | 94 | $abbrevLength++; //Increment abbreviation length |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | */ |
13 | 13 | private $invalidMiddleware; |
14 | 14 | |
15 | - public function __construct( $invalidMiddleware = null, $code = 0, Throwable $previous = null ) |
|
15 | + public function __construct($invalidMiddleware = null, $code = 0, Throwable $previous = null) |
|
16 | 16 | { |
17 | 17 | $message = \sprintf(self::ERROR_MESSAGE, MiddlewareInterface::class, $this->castStageToString($invalidMiddleware)); |
18 | - parent::__construct( $message, $code, $previous); |
|
18 | + parent::__construct($message, $code, $previous); |
|
19 | 19 | $this->invalidMiddleware = $invalidMiddleware; |
20 | 20 | } |
21 | 21 | |
@@ -23,20 +23,20 @@ discard block |
||
23 | 23 | * return the invalid middleware |
24 | 24 | * @return mixed|null |
25 | 25 | */ |
26 | - public function getInvalidMiddleware(){ |
|
26 | + public function getInvalidMiddleware() { |
|
27 | 27 | return $this->invalidMiddleware; |
28 | 28 | } |
29 | 29 | private function castStageToString(string $stage) : string{ |
30 | 30 | |
31 | - if(\is_scalar($stage)){ |
|
32 | - return (string) $stage; |
|
31 | + if (\is_scalar($stage)) { |
|
32 | + return (string)$stage; |
|
33 | 33 | } |
34 | 34 | |
35 | - if(\is_scalar($stage)){ |
|
35 | + if (\is_scalar($stage)) { |
|
36 | 36 | return \json_encode($stage) ?: 'array'; |
37 | 37 | } |
38 | 38 | |
39 | - if(\is_object($stage)){ |
|
39 | + if (\is_object($stage)) { |
|
40 | 40 | return \get_class($stage) ?: 'array'; |
41 | 41 | } |
42 | 42 |
@@ -125,8 +125,8 @@ |
||
125 | 125 | * |
126 | 126 | * O URL base do sistema |
127 | 127 | */ |
128 | -$root=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST']; |
|
129 | -$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); |
|
128 | +$root = (isset($_SERVER['HTTPS']) ? "https://" : "http://") . $_SERVER['HTTP_HOST']; |
|
129 | +$root .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); |
|
130 | 130 | |
131 | 131 | define('URL', $root); |
132 | 132 |
@@ -751,14 +751,14 @@ |
||
751 | 751 | array_pop($this->groups); |
752 | 752 | } |
753 | 753 | |
754 | - /** |
|
755 | - * Detect Routes Middleware; before or after |
|
756 | - * |
|
757 | - * @param $middleware |
|
758 | - * @param $type |
|
759 | - * |
|
760 | - * @return void |
|
761 | - */ |
|
754 | + /** |
|
755 | + * Detect Routes Middleware; before or after |
|
756 | + * |
|
757 | + * @param $middleware |
|
758 | + * @param $type |
|
759 | + * |
|
760 | + * @return void |
|
761 | + */ |
|
762 | 762 | public function runRouteMiddleware($middleware, $type) |
763 | 763 | { |
764 | 764 | if ($type === 'before') { |