Completed
Push — master ( 1ba521...7afd38 )
by Mihail
05:09
created
src/Ffcms/Core/Arch/Widget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
         // check if class exist
27 27
         if (!class_exists(self::$class)) {
28
-            return 'Error: Widget is not founded: ' . self::$class;
28
+            return 'Error: Widget is not founded: '.self::$class;
29 29
         }
30 30
 
31 31
         // init class and pass properties
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/FileSystem/File.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
     /**
211 211
      * Get file md5 hash
212 212
      * @param string $path
213
-     * @return bool|string
213
+     * @return false|string
214 214
      */
215 215
     public static function getMd5($path)
216 216
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,15 +192,15 @@
 block discarded – undo
192 192
             return [];
193 193
         }
194 194
 
195
-        $dir = opendir($path . '/.');
195
+        $dir = opendir($path.'/.');
196 196
         while ($item = readdir($dir)) {
197
-            if (is_file($sub = $path . '/' . $item)) {
197
+            if (is_file($sub = $path.'/'.$item)) {
198 198
                 $item_ext = Str::lastIn($item, '.');
199 199
                 if ($ext === null || Arr::in($item_ext, $ext)) {
200 200
                     if ($returnRelative) {
201 201
                         $files[] = $item;
202 202
                     } else {
203
-                        $files[] = $path . DIRECTORY_SEPARATOR . $item;
203
+                        $files[] = $path.DIRECTORY_SEPARATOR.$item;
204 204
                     }
205 205
                 }
206 206
             } else {
Please login to merge, or discard this patch.
src/Ffcms/Core/Managers/MigrationsManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 continue;
73 73
             }
74 74
             // check initialize conditions (equals to $exist)
75
-            if (File::exist($this->dir . '/' . $migration)) {
75
+            if (File::exist($this->dir.'/'.$migration)) {
76 76
                 if (Arr::in($fullName, $dbmigrations) === $exist) {
77 77
                     $found[] = $migration;
78 78
                 }
@@ -102,17 +102,17 @@  discard block
 block discarded – undo
102 102
         }
103 103
 
104 104
         // check if migration file is exists
105
-        if (!File::exist($this->dir . '/' . $file)) {
105
+        if (!File::exist($this->dir.'/'.$file)) {
106 106
             return false;
107 107
         }
108 108
 
109 109
         // check if migration file located in extend directory and copy to default
110 110
         if (Normalize::diskFullPath($this->dir) !== Normalize::diskFullPath(static::DEFAULT_DIR)) {
111
-            File::copy($this->dir . DIRECTORY_SEPARATOR . $file, static::DEFAULT_DIR . DIRECTORY_SEPARATOR . $file);
111
+            File::copy($this->dir.DIRECTORY_SEPARATOR.$file, static::DEFAULT_DIR.DIRECTORY_SEPARATOR.$file);
112 112
         }
113 113
 
114 114
         // include migration and get class name
115
-        File::inc($this->dir . '/' . $file, false, false);
115
+        File::inc($this->dir.'/'.$file, false, false);
116 116
         $fullName = Str::cleanExtension($file);
117 117
         $class = Str::firstIn($fullName, '-');
118 118
 
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
         }
149 149
 
150 150
         // check if exists
151
-        if (!File::exist($this->dir . '/' . $file)) {
151
+        if (!File::exist($this->dir.'/'.$file)) {
152 152
             return false;
153 153
         }
154 154
 
155
-        File::inc($this->dir . '/' . $file, false, false);
155
+        File::inc($this->dir.'/'.$file, false, false);
156 156
         $fullName = Str::cleanExtension($file);
157 157
         $class = Str::firstIn($fullName, '-');
158 158
 
Please login to merge, or discard this patch.
src/Ffcms/Core/Arch/ActiveModel.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
     /**
92 92
      * Serialize value
93 93
      * @param $value
94
-     * @return Serialize
94
+     * @return string
95 95
      */
96 96
     public function asSerialize($value)
97 97
     {
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Form/Constructor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         // check if properties is passed well
47 47
         if ($properties !== null && !Obj::isArray($properties)) {
48
-            throw new SyntaxException('Property must be passed as array or null! Field: ' . $name);
48
+            throw new SyntaxException('Property must be passed as array or null! Field: '.$name);
49 49
         }
50 50
         
51 51
         // add properties to autovalidation by js (properties passed by ref)
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
         
99 99
         // if field is unknown type add notification in debugbar
100 100
         if (App::$Debug !== null) {
101
-            App::$Debug->addMessage('Field with name [' . App::$Security->strip_tags($name) . '] have unknown type [' . $this->type . ']', 'error');
101
+            App::$Debug->addMessage('Field with name ['.App::$Security->strip_tags($name).'] have unknown type ['.$this->type.']', 'error');
102 102
         }
103
-        return 'No data: ' . App::$Security->strip_tags($name);
103
+        return 'No data: '.App::$Security->strip_tags($name);
104 104
     }
105 105
     
106 106
     /**
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
         if (Str::contains('.', $name)) {
148 148
             $splitedName = explode('.', $name);
149 149
             foreach ($splitedName as $nameKey) {
150
-                $properties['name'] .= '[' . $nameKey . ']';
151
-                $properties['id'] .= '-' . $nameKey;
150
+                $properties['name'] .= '['.$nameKey.']';
151
+                $properties['id'] .= '-'.$nameKey;
152 152
             }
153 153
         } else { // standard property definition - add field name
154
-            $properties['name'] .= '[' . $name . ']';
155
-            $properties['id'] .= '-' . $name;
154
+            $properties['name'] .= '['.$name.']';
155
+            $properties['id'] .= '-'.$name;
156 156
         }
157 157
     }
158 158
 }
159 159
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ffcms/Core/App.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         try {
178 178
             /** @var \Ffcms\Core\Arch\Controller $callClass */
179 179
             $callClass = null;
180
-            $callMethod = 'action' . self::$Request->getAction();
180
+            $callMethod = 'action'.self::$Request->getAction();
181 181
 
182 182
             // founded callback injection alias
183 183
             if (self::$Request->getCallbackAlias() !== false) {
@@ -185,16 +185,16 @@  discard block
 block discarded – undo
185 185
                 if (class_exists($cName)) {
186 186
                     $callClass = new $cName;
187 187
                 } else {
188
-                    throw new NotFoundException('Callback alias of class "' . App::$Security->strip_tags($cName) . '" is not founded');
188
+                    throw new NotFoundException('Callback alias of class "'.App::$Security->strip_tags($cName).'" is not founded');
189 189
                 }
190 190
             } else { // typical parsing of native apps
191
-                $cName = '\Apps\Controller\\' . env_name . '\\' . self::$Request->getController();
191
+                $cName = '\Apps\Controller\\'.env_name.'\\'.self::$Request->getController();
192 192
 
193 193
                 // try to initialize class object
194 194
                 if (class_exists($cName)) {
195 195
                     $callClass = new $cName;
196 196
                 } else {
197
-                    throw new NotFoundException('Application can not be runned. Initialized class not founded: ' . App::$Security->strip_tags($cName));
197
+                    throw new NotFoundException('Application can not be runned. Initialized class not founded: '.App::$Security->strip_tags($cName));
198 198
                 }
199 199
             }
200 200
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 // build full compiled output html data
239 239
                 $html = $callClass->buildOutput();
240 240
             } else {
241
-                throw new NotFoundException('Method "' . App::$Security->strip_tags($callMethod) . '()" not founded in "' . get_class($callClass) . '"');
241
+                throw new NotFoundException('Method "'.App::$Security->strip_tags($callMethod).'()" not founded in "'.get_class($callClass).'"');
242 242
             }
243 243
         } catch (NotFoundException $e) { // catch exceptions and set output
244 244
             $html = $e->display();
Please login to merge, or discard this patch.
src/Ffcms/Core/Properties.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
         }
43 43
 
44 44
         // try to load from file
45
-        $configFile = ucfirst(Str::lowerCase($configName)) . '.php';
46
-        if (File::exist('/Private/Config/' . $configFile)) {
47
-            $this->data[$configName] = File::inc('/Private/Config/' . $configFile, true);
45
+        $configFile = ucfirst(Str::lowerCase($configName)).'.php';
46
+        if (File::exist('/Private/Config/'.$configFile)) {
47
+            $this->data[$configName] = File::inc('/Private/Config/'.$configFile, true);
48 48
             return true;
49 49
         }
50 50
 
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
      */
142 142
     public function writeConfig($configFile, array $data)
143 143
     {
144
-        $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php';
144
+        $path = '/Private/Config/'.ucfirst(Str::lowerCase($configFile)).'.php';
145 145
         if (!File::exist($path) || !File::writable($path)) {
146 146
             return false;
147 147
         }
148
-        $saveData = '<?php return ' . Arr::exportVar($data) . ';';
148
+        $saveData = '<?php return '.Arr::exportVar($data).';';
149 149
         File::write($path, $saveData);
150 150
         // overload config values if changed
151 151
         $this->load($configFile, true);
Please login to merge, or discard this patch.
src/Ffcms/Core/Arch/Controller.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         if ($this->layout === null) {
61 61
             $content = $this->output;
62 62
         } else {
63
-            $layoutPath = App::$Alias->currentViewPath . '/layout/' . $this->layout . '.php';
63
+            $layoutPath = App::$Alias->currentViewPath.'/layout/'.$this->layout.'.php';
64 64
             if (!File::exist($layoutPath)) {
65
-                throw new NativeException('Layout not founded: ' . $layoutPath);
65
+                throw new NativeException('Layout not founded: '.$layoutPath);
66 66
             }
67 67
 
68 68
             $body = $this->output;
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
             // set custom css library's not included on static call
82 82
             $cssIncludeCode = App::$View->showCodeLink('css');
83 83
             if (!Str::likeEmpty($cssIncludeCode)) {
84
-                $content = Str::replace('</head>', $cssIncludeCode . '</head>', $content);
84
+                $content = Str::replace('</head>', $cssIncludeCode.'</head>', $content);
85 85
             }
86 86
 
87 87
             // add debug bar
88 88
             if (App::$Debug !== null) {
89 89
                 $content = Str::replace(
90 90
                     ['</body>', '</head>'],
91
-                    [App::$Debug->renderOut() . '</body>', App::$Debug->renderHead() . '</head>'],
91
+                    [App::$Debug->renderOut().'</body>', App::$Debug->renderHead().'</head>'],
92 92
                     $content);
93 93
             }
94 94
 
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Bootstrap/Navbar.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         // set mobile collapse id for toggle
38 38
         $mobCollapseId = $elements['collapseId'];
39 39
         if (Str::likeEmpty($mobCollapseId)) {
40
-            $mobCollapseId = Str::randomLatin(mt_rand(6,12)) . mt_rand(1, 99);
40
+            $mobCollapseId = Str::randomLatin(mt_rand(6, 12)).mt_rand(1, 99);
41 41
         }
42 42
 
43 43
         // set element id for toggle
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         // generate output dom of bootstrap navbar
100 100
         $dom = new Dom();
101 101
         $body = $dom->div(function() use ($leftBuild, $rightBuild, $itemsStatic){
102
-            return $leftBuild . $itemsStatic . $rightBuild;
102
+            return $leftBuild.$itemsStatic.$rightBuild;
103 103
         }, ['class' => 'collapse navbar-collapse', 'id' => $mobCollapseId]);
104 104
 
105 105
         // drow <nav @properties>@next</nav>
@@ -110,17 +110,17 @@  discard block
 block discarded – undo
110 110
                 $header = $dom->div(function() use ($dom, $elements, $mobCollapseId){
111 111
                     // drow <button @collapse>@next</button>
112 112
                     $collapseButton = $dom->button(function() use ($dom){
113
-                        $toggleItem = $dom->span(function(){
113
+                        $toggleItem = $dom->span(function() {
114 114
                             return 'Toggle menu';
115 115
                         }, ['class' => 'sr-only']);
116 116
                         $toggleIcon = null;
117 117
                         for ($i = 0; $i < 3; $i++) {
118
-                            $toggleIcon .= $dom->span(function(){
118
+                            $toggleIcon .= $dom->span(function() {
119 119
                                 return null;
120 120
                             }, ['class' => 'icon-bar']);
121 121
                         }
122
-                        return $toggleItem . $toggleIcon;
123
-                    }, ['type' => 'button', 'class' => 'navbar-toggle collapsed', 'data-toggle' => 'collapse', 'data-target' => '#' . $mobCollapseId]);
122
+                        return $toggleItem.$toggleIcon;
123
+                    }, ['type' => 'button', 'class' => 'navbar-toggle collapsed', 'data-toggle' => 'collapse', 'data-target' => '#'.$mobCollapseId]);
124 124
                     // drow <div @brand>@brandtext<?div>
125 125
                     $brand = null;
126 126
                     if (isset($elements['brand'])) {
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
                             }, $elements['brand']['property']);
136 136
                         }
137 137
                     }
138
-                    return $collapseButton . $brand;
138
+                    return $collapseButton.$brand;
139 139
                 }, ['class' => 'navbar-header']);
140 140
                 // return header and body concat
141
-                return $header . $body;
141
+                return $header.$body;
142 142
             }, $elements['container']);
143 143
         }, $elements['nav']);
144 144
     }
Please login to merge, or discard this patch.