Completed
Push — master ( 8320f0...1fd9bf )
by Mihail
05:33
created
src/Ffcms/Core/Helper/Type/Arr.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -118,16 +118,16 @@
 block discarded – undo
118 118
                         return 'true';
119 119
                     }
120 120
                 }
121
-                return '\'' . $var . '\'';
121
+                return '\''.$var.'\'';
122 122
             case 'array':
123 123
                 $indexed = array_keys($var) === range(0, count($var) - 1);
124 124
                 $row = [];
125 125
                 foreach ($var as $key => $value) {
126
-                    $row[] = $indent . "\t"
127
-                        . ($indexed ? null : self::exportVar($key, null, $guessTypes) . ' => ')
128
-                        . self::exportVar($value, $indent . "\t", $guessTypes);
126
+                    $row[] = $indent."\t"
127
+                        . ($indexed ? null : self::exportVar($key, null, $guessTypes).' => ')
128
+                        . self::exportVar($value, $indent."\t", $guessTypes);
129 129
                 }
130
-                return "[\n" . implode(",\n", $row) . "\n" . $indent . ']';
130
+                return "[\n".implode(",\n", $row)."\n".$indent.']';
131 131
             case 'boolean':
132 132
                 return $var ? 'true' : 'false';
133 133
             default:
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Environment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,6 @@
 block discarded – undo
67 67
             return 'error';
68 68
         }
69 69
 
70
-        return (int)$load . '%';
70
+        return (int)$load.'%';
71 71
     }
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ffcms/Core/Network/Response.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@
 block discarded – undo
22 22
     {
23 23
         $to = trim($to, '/');
24 24
         if (false === $full && !Str::startsWith(App::$Alias->baseUrl, $to)) {
25
-            $to = App::$Alias->baseUrl . '/' . $to;
25
+            $to = App::$Alias->baseUrl.'/'.$to;
26 26
         }
27 27
         $redirect = new FoundationRedirect($to);
28 28
         $redirect->send();
29
-        exit('Redirecting to ' . $to . ' ...');
29
+        exit('Redirecting to '.$to.' ...');
30 30
     }
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ffcms/Core/Exception/TemplateException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         // build error text
63 63
         $rawResponse = 'error';
64 64
         try {
65
-            $rawResponse = App::$View->render('native/errors/' . $this->tpl, ['msg' => $this->text]);
65
+            $rawResponse = App::$View->render('native/errors/'.$this->tpl, ['msg' => $this->text]);
66 66
             if (Str::likeEmpty($rawResponse)) {
67 67
                 $rawResponse = $this->text;
68 68
             }
Please login to merge, or discard this patch.
src/Ffcms/Core/Exception/NativeException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     protected function sendHTML($message = null)
56 56
     {
57 57
         header('HTTP/1.1 404 Not Found');
58
-        return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>' . $message . '</p></div></body></html>';
58
+        return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>'.$message.'</p></div></body></html>';
59 59
     }
60 60
     
61 61
     /**
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Listing.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         // initialize new DOM model
31 31
         $dom = new Dom();
32 32
         // return DOM-HTML, build based on closures!
33
-        return $dom->{$elements['type']}(function () use ($dom, $elements) {
33
+        return $dom->{$elements['type']}(function() use ($dom, $elements) {
34 34
             // prepare output avg variable
35 35
             $itemHTML = null;
36 36
             // get active order level
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         return $dom->li(function() use($dom, $item){
69 69
             $dropdownLink = $dom->a(function() use ($dom, $item){
70
-                return self::applyEscape($item['text'], $item['html'], $item['!secure']) . ' ' . $dom->span(function(){}, ['class' => 'caret']);
70
+                return self::applyEscape($item['text'], $item['html'], $item['!secure']).' '.$dom->span(function() {}, ['class' => 'caret']);
71 71
             }, $item['dropdown']);
72 72
 
73 73
             $dropdownElements = $dom->ul(function() use ($dom, $item){
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 return $resp;
79 79
             }, ['class' => 'dropdown-menu']);
80 80
 
81
-            return $dropdownLink . $dropdownElements;
81
+            return $dropdownLink.$dropdownElements;
82 82
         }, $item['property']);
83 83
 
84 84
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $item['linkProperty']['href'] = self::convertLink($item['link']);
131 131
 
132 132
         // build output <li@params><a @params>@text</li>
133
-        return $dom->li(function () use ($dom, $text, $item) {
133
+        return $dom->li(function() use ($dom, $text, $item) {
134 134
             return $dom->a(function() use ($text) {
135 135
                 return $text;
136 136
             }, $item['linkProperty']);
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Bootstrap/Nav.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             } elseif ($item['type'] === 'tab') {
61 61
                 $activeObject = false;
62 62
                 $item['type'] = 'link'; // fix for global Listing builder
63
-                $item['link'] = '#' . $elements['tabAnchor'] . $tabIdx;
63
+                $item['link'] = '#'.$elements['tabAnchor'].$tabIdx;
64 64
 
65 65
                 $item['property']['role'] = 'presentation';
66 66
 
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
 
76 76
                 // mark active tab
77 77
                 if ($activeObject === true) {
78
-                    $item['property']['class'] .= (Str::length($item['property']['class']) > 0 ? ' ' : null) . 'active';
78
+                    $item['property']['class'] .= (Str::length($item['property']['class']) > 0 ? ' ' : null).'active';
79 79
                 }
80 80
 
81 81
                 // tab special properties for bootstrap
82
-                $item['linkProperty']['aria-controls'] = $elements['tabAnchor'] . $tabIdx;
82
+                $item['linkProperty']['aria-controls'] = $elements['tabAnchor'].$tabIdx;
83 83
                 $item['linkProperty']['role'] = 'tab';
84 84
                 $item['linkProperty']['data-toggle'] = 'tab';
85 85
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                     } else {
99 99
                         return self::nohtml($itemContent);
100 100
                     }
101
-                }, ['role' => 'tabpanel', 'class' => 'tab-pane fade' . ($activeObject === true ? ' in active' : null), 'id' => $elements['tabAnchor'] . $tabIdx]);
101
+                }, ['role' => 'tabpanel', 'class' => 'tab-pane fade'.($activeObject === true ? ' in active' : null), 'id' => $elements['tabAnchor'].$tabIdx]);
102 102
                 $tabIdx++;
103 103
             }
104 104
         }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         // check if global class "nav" isset
107 107
         if ($elements['property']['class'] !== null) {
108 108
             if (!Str::contains('nav ', $elements['property']['class'])) {
109
-                $elements['property']['class'] = 'nav ' . $elements['property']['class'];
109
+                $elements['property']['class'] = 'nav '.$elements['property']['class'];
110 110
             }
111 111
         } else {
112 112
             $elements['property']['class'] = 'nav';
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                     return $tabContent;
127 127
                 }, ['class' => 'tab-content']);
128 128
             }
129
-            return $listing . $tabContent;
129
+            return $listing.$tabContent;
130 130
         }, $blockProperty);
131 131
     }
132 132
 }
133 133
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Type/Str.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@
 block discarded – undo
297 297
 
298 298
         $output = null;
299 299
         foreach ($args as $string) {
300
-            $output .= $string . $separator;
300
+            $output .= $string.$separator;
301 301
         }
302 302
 
303 303
         $output = rtrim($output, $separator);
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * Find first entry in $string before $delimiter
58 58
      * @param string $string
59 59
      * @param string $delimiter
60
-     * @return string|bool
60
+     * @return false|string
61 61
      */
62 62
     public static function firstIn($string, $delimiter)
63 63
     {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @param string $string
73 73
      * @param string $delimiter
74 74
      * @param bool $withoutDelimiter
75
-     * @return string|bool
75
+     * @return false|string
76 76
      */
77 77
     public static function lastIn($string, $delimiter, $withoutDelimiter = false)
78 78
     {
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
 
215 215
     /**
216 216
      * Case-ignore replace $needle to $replacement in string $haystack. Alias for function str_ireplace()
217
-     * @param string|array $needle
218
-     * @param string|array $replacement
217
+     * @param string[] $needle
218
+     * @param string $replacement
219 219
      * @param string $haystack
220 220
      * @return string
221 221
      */
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     /**
311 311
      * Check is $string sounds like a phone number
312 312
      * @param string $string
313
-     * @return int
313
+     * @return boolean
314 314
      */
315 315
     public static function isPhone($string)
316 316
     {
@@ -319,9 +319,6 @@  discard block
 block discarded – undo
319 319
 
320 320
     /**
321 321
      * Concat string with add string by separator
322
-     * @param string $separator
323
-     * @param string $string1
324
-     * @param string $string2
325 322
      * @return string
326 323
      */
327 324
     public static function concat()
Please login to merge, or discard this patch.
src/Ffcms/Core/I18n/Translate.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 
116 116
     /**
117 117
      * Get available languages in the filesystem
118
-     * @return array
118
+     * @return string[]
119 119
      */
120 120
     public function getAvailableLangs()
121 121
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         if (Obj::isArray($params) && count($params) > 0) {
56 56
             foreach ($params as $var => $value) {
57
-                $text = Str::replace('%' . $var . '%', $value, $text);
57
+                $text = Str::replace('%'.$var.'%', $value, $text);
58 58
             }
59 59
         }
60 60
         return $text;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function translate($text, array $params = [])
70 70
     {
71 71
         $index = null;
72
-        $namespace = 'Apps\Controller\\' . env_name . '\\';
72
+        $namespace = 'Apps\Controller\\'.env_name.'\\';
73 73
         foreach (@debug_backtrace() as $caller) {
74 74
             if (isset($caller['class']) && Str::startsWith($namespace, $caller['class'])) {
75 75
                 $index = Str::sub((string)$caller['class'], Str::length($namespace));
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     protected function load($index)
87 87
     {
88
-        $file = root . '/I18n/' . env_name . '/' . App::$Request->getLanguage() . '/' . $index . '.php';
88
+        $file = root.'/I18n/'.env_name.'/'.App::$Request->getLanguage().'/'.$index.'.php';
89 89
         if (!File::exist($file)) {
90 90
             return [];
91 91
         }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     public function getAvailableLangs()
124 124
     {
125 125
         $langs = ['en'];
126
-        $scan = Directory::scan(root . '/I18n/' . env_name . '/', GLOB_ONLYDIR, true);
126
+        $scan = Directory::scan(root.'/I18n/'.env_name.'/', GLOB_ONLYDIR, true);
127 127
         foreach ($scan as $row) {
128 128
             $langs[] = trim($row, '/');
129 129
         }
Please login to merge, or discard this patch.