Completed
Push — master ( 329d6c...681acd )
by Mihail
03:11
created
src/Ffcms/Core/Arch/Model.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * Get label value by variable name
32 32
      * @param string $param
33
-     * @return mixed
33
+     * @return string
34 34
      */
35 35
     final public function getLabel($param)
36 36
     {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     /**
74 74
      * Set attribute labels for model variables
75
-     * @return array
75
+     * @return string
76 76
      */
77 77
     public function labels()
78 78
     {
Please login to merge, or discard this patch.
src/Ffcms/Core/Arch/View.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
     /**
227 227
      * Show custom code library link
228 228
      * @param string $type - js or css allowed
229
-     * @return array|null|string
229
+     * @return null|string
230 230
      */
231 231
     public function showCodeLink($type)
232 232
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ffcms\Core\App;
6 6
 use Ffcms\Core\Exception\NativeException;
7
-use Ffcms\Core\Exception\NotFoundException;
8 7
 use Ffcms\Core\Exception\SyntaxException;
9 8
 use Ffcms\Core\Helper\FileSystem\Directory;
10 9
 use Ffcms\Core\Helper\FileSystem\File;
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
     {
45 45
         // get theme config and build full path
46 46
         $themeConfig = App::$Properties->get('theme');
47
-        $this->themePath = root . DIRECTORY_SEPARATOR . 'Apps' . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . env_name;
47
+        $this->themePath = root.DIRECTORY_SEPARATOR.'Apps'.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR.env_name;
48 48
         if (isset($themeConfig[env_name]) && Str::length($themeConfig[env_name]) > 0) {
49
-            $this->themePath .=  DIRECTORY_SEPARATOR . $themeConfig[env_name];
49
+            $this->themePath .= DIRECTORY_SEPARATOR.$themeConfig[env_name];
50 50
         } else {
51
-            $this->themePath .= DIRECTORY_SEPARATOR . 'default';
51
+            $this->themePath .= DIRECTORY_SEPARATOR.'default';
52 52
         }
53 53
 
54 54
         // check if theme is available
55 55
         if (!Directory::exist($this->themePath)) {
56
-            throw new NativeException('Apps theme is not founded: ' . Str::replace(root, null, $this->themePath));
56
+            throw new NativeException('Apps theme is not founded: '.Str::replace(root, null, $this->themePath));
57 57
         }
58 58
 
59 59
         // get input args and build class properties
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         
97 97
         // path still not defined?
98 98
         if ($path === null) {
99
-            throw new SyntaxException('Viewer is not founded: ' . App::$Security->strip_tags($path));
99
+            throw new SyntaxException('Viewer is not founded: '.App::$Security->strip_tags($path));
100 100
         }
101 101
 
102 102
         // cleanup from slashes on start/end
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             // lets try to get full path for current theme
126 126
             $tmpPath = $path;
127 127
             if (!Str::startsWith($this->themePath, $path)) {
128
-                $tmpPath = Normalize::diskPath($this->themePath . '/' . $path . '.php');
128
+                $tmpPath = Normalize::diskPath($this->themePath.'/'.$path.'.php');
129 129
             }
130 130
         } else { // sounds like a object-depended view call from controller or etc
131 131
             // get stack trace of callbacks
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
 
142 142
             // depended controller is not founded? Let finish
143 143
             if ($calledController === null) {
144
-                throw new NativeException('View render is failed: callback controller not founded! Call with relative path: ' . $path);
144
+                throw new NativeException('View render is failed: callback controller not founded! Call with relative path: '.$path);
145 145
             }
146 146
 
147 147
             // get controller name
148
-            $controllerName = Str::sub($calledController, Str::length('Apps\\Controller\\' . env_name . '\\'));
148
+            $controllerName = Str::sub($calledController, Str::length('Apps\\Controller\\'.env_name.'\\'));
149 149
             $controllerName = Str::lowerCase($controllerName);
150 150
             // get full path
151
-            $tmpPath = $this->themePath . DIRECTORY_SEPARATOR . $controllerName . DIRECTORY_SEPARATOR . $path . '.php';
151
+            $tmpPath = $this->themePath.DIRECTORY_SEPARATOR.$controllerName.DIRECTORY_SEPARATOR.$path.'.php';
152 152
         }
153 153
 
154 154
         // check if builded view full path is exist
@@ -158,18 +158,18 @@  discard block
 block discarded – undo
158 158
 
159 159
         // hmm, not founded. Lets try to find in caller directory (for widgets, apps packages and other)
160 160
         if ($source !== null) {
161
-            $tmpPath = Normalize::diskPath($source . DIRECTORY_SEPARATOR . $path . '.php');
161
+            $tmpPath = Normalize::diskPath($source.DIRECTORY_SEPARATOR.$path.'.php');
162 162
             if (File::exist($tmpPath)) {
163 163
                 // add notify for native views
164 164
                 if (App::$Debug !== null) {
165
-                    App::$Debug->addMessage('Render native viewer: ' . Str::replace(root, null, $tmpPath), 'info');
165
+                    App::$Debug->addMessage('Render native viewer: '.Str::replace(root, null, $tmpPath), 'info');
166 166
                 }
167 167
                 return $tmpPath;
168 168
             }
169 169
         }
170 170
 
171 171
         if (App::$Debug !== null) {
172
-            App::$Debug->addMessage('Viewer not founded on rendering: ' . $path, 'warning');
172
+            App::$Debug->addMessage('Viewer not founded on rendering: '.$path, 'warning');
173 173
         }
174 174
 
175 175
         return null;
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         foreach ($items as $item) {
265 265
             $item = trim($item, '/');
266 266
             if (!Str::startsWith(App::$Alias->scriptUrl, $item) && !Str::startsWith('http', $item)) { // is local without proto and domain
267
-                $item = App::$Alias->scriptUrl . '/' . $item;
267
+                $item = App::$Alias->scriptUrl.'/'.$item;
268 268
             }
269 269
             $output[] = $item;
270 270
         }
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
         $output = null;
274 274
         foreach ($clear as $row) {
275 275
             if ($type === 'css') {
276
-                $output .= '<link rel="stylesheet" type="text/css" href="' . $row . '">' . "\n";
276
+                $output .= '<link rel="stylesheet" type="text/css" href="'.$row.'">'."\n";
277 277
             } elseif ($type === 'js') {
278
-                $output .= '<script src="' . $row . '"></script>' . "\n";
278
+                $output .= '<script src="'.$row.'"></script>'."\n";
279 279
             }
280 280
         }
281 281
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
         $code = null;
300 300
         foreach (App::$Alias->getPlainCode($type) as $row) {
301
-            $code .= $row . "\n";
301
+            $code .= $row."\n";
302 302
         }
303 303
 
304 304
         return $code;
Please login to merge, or discard this patch.
src/Ffcms/Core/Filter/Native.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     /**
144 144
      * Filter ['object', 'phone']
145 145
      * @param string $object
146
-     * @return bool|int
146
+     * @return boolean
147 147
      */
148 148
     public static function phone($object)
149 149
     {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      * Direct preg_match expression. Filter ['object', 'direct_match', '/^[A-Z]/*$']
198 198
      * @param $object
199 199
      * @param $value
200
-     * @return bool|int
200
+     * @return boolean
201 201
      */
202 202
     public static function direct_match($object, $value)
203 203
     {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      * Regular expression validation rule ['object', 'reg_match', '/^[A-Z]/*$']
219 219
      * @param $object
220 220
      * @param $value
221
-     * @return bool|int
221
+     * @return boolean
222 222
      */
223 223
     public static function reg_match($object, $value)
224 224
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Ffcms\Core\Helper\HTML\Bootstrap;
4 4
 
5
-use Ffcms\Core\App;
6 5
 use Ffcms\Core\Helper\Type\Arr;
7 6
 use Ffcms\Core\Helper\HTML\Listing;
8 7
 use Ffcms\Core\Helper\Type\Obj;
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Bootstrap/Nav.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Ffcms\Core\Helper\HTML\Bootstrap;
4 4
 
5
-use Ffcms\Core\App;
6 5
 use Ffcms\Core\Helper\Type\Arr;
7 6
 use Ffcms\Core\Helper\HTML\Listing;
8 7
 use Ffcms\Core\Helper\Type\Obj;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             } elseif ($item['type'] === 'tab') {
45 45
                 $activeObject = false;
46 46
                 $item['type'] = 'link'; // fix for global Listing builder
47
-                $item['link'] = '#' . $elements['tabAnchor'] . $tabIdx;
47
+                $item['link'] = '#'.$elements['tabAnchor'].$tabIdx;
48 48
 
49 49
                 $item['property']['role'] = 'presentation';
50 50
 
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 
60 60
                 // mark active tab
61 61
                 if ($activeObject === true) {
62
-                    $item['property']['class'] .= (Str::length($item['property']['class']) > 0 ? ' ' : null) . 'active';
62
+                    $item['property']['class'] .= (Str::length($item['property']['class']) > 0 ? ' ' : null).'active';
63 63
                 }
64 64
 
65 65
                 // tab special properties for bootstrap
66
-                $item['linkProperty']['aria-controls'] = $elements['tabAnchor'] . $tabIdx;
66
+                $item['linkProperty']['aria-controls'] = $elements['tabAnchor'].$tabIdx;
67 67
                 $item['linkProperty']['role'] = 'tab';
68 68
                 $item['linkProperty']['data-toggle'] = 'tab';
69 69
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 $items[] = $item;
73 73
 
74 74
                 // draw tab content
75
-                $tabContent .= '<div role="tabpanel" class="tab-pane fade' . ($activeObject === true ? ' in active' : null) . '" id="' . $elements['tabAnchor'] . $tabIdx . '">';
75
+                $tabContent .= '<div role="tabpanel" class="tab-pane fade'.($activeObject === true ? ' in active' : null).'" id="'.$elements['tabAnchor'].$tabIdx.'">';
76 76
                 if ($item['html'] === true) {
77 77
                     if ($item['!secure'] === true) {
78 78
                         $tabContent .= $itemContent;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $tabContent .= '</div>';
91 91
 
92 92
         if ($elements['property']['class'] !== null) {
93
-            $elements['property']['class'] = 'nav ' . $elements['property']['class'];
93
+            $elements['property']['class'] = 'nav '.$elements['property']['class'];
94 94
         } else {
95 95
             $elements['property']['class'] = 'nav';
96 96
         }
@@ -107,6 +107,6 @@  discard block
 block discarded – undo
107 107
 
108 108
         $blockProperty['role'] = 'tabpanel';
109 109
 
110
-        return self::buildContainerTag('div', $blockProperty, $listing . $tabContent, true);
110
+        return self::buildContainerTag('div', $blockProperty, $listing.$tabContent, true);
111 111
     }
112 112
 }
113 113
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Url.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * @param string|null $add
19 19
      * @param array $params
20 20
      * @param bool $encode
21
-     * @return null|string
21
+     * @return string
22 22
      */
23 23
     public static function to($controller_action, $id = null, $add = null, array $params = null, $encode = true)
24 24
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public static function to($controller_action, $id = null, $add = null, array $params = null, $encode = true)
24 24
     {
25 25
         $pathway = self::buildPathway([$controller_action, $id, $add, $params], $encode);
26
-        return App::$Alias->baseUrl . '/' . $pathway;
26
+        return App::$Alias->baseUrl.'/'.$pathway;
27 27
     }
28 28
 
29 29
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                 $controller = Str::lastIn($controller, '\\', true);
61 61
             }
62 62
 
63
-            $response = $controller . '/' . $action;
63
+            $response = $controller.'/'.$action;
64 64
         }
65 65
 
66 66
         // check if controller and action is defined
@@ -70,17 +70,17 @@  discard block
 block discarded – undo
70 70
 
71 71
         // id is defined?
72 72
         if (isset($to[1]) && !Str::likeEmpty($to[1])) {
73
-            $response .= '/' . self::safeUri($to[1], $encode);
73
+            $response .= '/'.self::safeUri($to[1], $encode);
74 74
         }
75 75
 
76 76
         // add param is defined?
77 77
         if (isset($to[2]) && !Str::likeEmpty($to[2])) {
78
-            $response .= '/' . self::safeUri($to[2], $encode);
78
+            $response .= '/'.self::safeUri($to[2], $encode);
79 79
         }
80 80
 
81 81
         // try to find static alias
82
-        if (isset($routing['Alias'][env_name]) && Arr::in('/' . $response, $routing['Alias'][env_name])) {
83
-            $pathAlias = array_search('/' . $response, $routing['Alias'][env_name]);
82
+        if (isset($routing['Alias'][env_name]) && Arr::in('/'.$response, $routing['Alias'][env_name])) {
83
+            $pathAlias = array_search('/'.$response, $routing['Alias'][env_name]);
84 84
             if ($pathAlias !== false) {
85 85
                 $response = Str::lowerCase(trim($pathAlias, '/'));
86 86
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             }
97 97
             $queryString = http_build_query($to[3]);
98 98
             if (Str::length($queryString) > 0) {
99
-                $response .= '?' . http_build_query($to[3]);
99
+                $response .= '?'.http_build_query($to[3]);
100 100
             }
101 101
             if ($anchor !== false) {
102 102
                 $response .= $anchor;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     public static function buildPathwayFromRequest()
119 119
     {
120 120
         return self::buildPathway([
121
-            Str::lowerCase(App::$Request->getController()) . '/' . Str::lowerCase(App::$Request->getAction()),
121
+            Str::lowerCase(App::$Request->getController()).'/'.Str::lowerCase(App::$Request->getAction()),
122 122
             App::$Request->getID(),
123 123
             App::$Request->getAdd(),
124 124
             App::$Request->query->all()
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
             $to = [$to];
141 141
         }
142 142
         // call Url::to(args)
143
-        $callbackTo = call_user_func_array([__NAMESPACE__ . '\Url', 'to'], $to);
143
+        $callbackTo = call_user_func_array([__NAMESPACE__.'\Url', 'to'], $to);
144 144
 
145
-        return '<a href="' . $callbackTo . '"' . $compile_property . '>' . $name . '</a>';
145
+        return '<a href="'.$callbackTo.'"'.$compile_property.'>'.$name.'</a>';
146 146
     }
147 147
 
148 148
     /**
Please login to merge, or discard this patch.
src/Ffcms/Core/I18n/Translate.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     /**
114 114
      * Get available languages in the filesystem
115
-     * @return array
115
+     * @return string[]
116 116
      */
117 117
     public function getAvailableLangs()
118 118
     {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     /**
128 128
      * Get lexer
129
-     * @return static
129
+     * @return Lexer
130 130
      */
131 131
     public function lexer()
132 132
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         if (Obj::isArray($params) && count($params) > 0) {
54 54
             foreach ($params as $var => $value) {
55
-                $text = Str::replace('%' . $var . '%', $value, $text);
55
+                $text = Str::replace('%'.$var.'%', $value, $text);
56 56
             }
57 57
         }
58 58
         return $text;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function translate($text, array $params = [])
68 68
     {
69 69
         $index = null;
70
-        $namespace = 'Apps\\Controller\\' . env_name . '\\';
70
+        $namespace = 'Apps\\Controller\\'.env_name.'\\';
71 71
         foreach (debug_backtrace() as $caller) {
72 72
             if (isset($caller['class']) && Str::startsWith($namespace, $caller['class'])) {
73 73
                 $index = Str::sub((string)$caller['class'], Str::length($namespace));
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     protected function load($index)
85 85
     {
86
-        $file = root . '/I18n/' . env_name . '/' . App::$Request->getLanguage() . '/' . $index . '.php';
86
+        $file = root.'/I18n/'.env_name.'/'.App::$Request->getLanguage().'/'.$index.'.php';
87 87
         if (!File::exist($file)) {
88 88
             return [];
89 89
         }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     public function getAvailableLangs()
122 122
     {
123 123
         $langs = ['en'];
124
-        $scan = Directory::scan(root . '/I18n/' . env_name . '/', GLOB_ONLYDIR, true);
124
+        $scan = Directory::scan(root.'/I18n/'.env_name.'/', GLOB_ONLYDIR, true);
125 125
         foreach ($scan as $row) {
126 126
             $langs[] = trim($row, '/');
127 127
         }
Please login to merge, or discard this patch.
src/Ffcms/Core/Network/Request.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
     /**
241 241
      * Get current $id argument for controller action
242
-     * @return string|null
242
+     * @return string
243 243
      */
244 244
     public function getID()
245 245
     {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
     /**
250 250
      * Get current $add argument for controller action
251
-     * @return string|null
251
+     * @return string
252 252
      */
253 253
     public function getAdd()
254 254
     {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
     /**
259 259
      * Get callback class alias if exist
260
-     * @return bool|string
260
+     * @return boolean
261 261
      */
262 262
     public function getCallbackAlias()
263 263
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 
58 58
         $basePath = trim(App::$Properties->get('basePath'), '/');
59 59
         if ($basePath !== null && Str::length($basePath) > 0) {
60
-            $basePath = '/' . $basePath;
60
+            $basePath = '/'.$basePath;
61 61
         }
62 62
 
63 63
         if (!defined('env_no_uri') || env_no_uri === false) {
64
-            $basePath .= '/' . strtolower(env_name);
64
+            $basePath .= '/'.strtolower(env_name);
65 65
         }
66 66
 
67 67
         // we never try to use path's without friendly url's
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             } else {
83 83
                 // try to find language in pathway
84 84
                 foreach (App::$Properties->get('languages') as $lang) {
85
-                    if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
85
+                    if (Str::startsWith('/'.$lang, $this->getPathInfo())) {
86 86
                         $this->language = $lang;
87 87
                         $this->languageInPath = true;
88 88
                     }
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
 
109 109
                     $queryString = null;
110 110
                     if (count($this->query->all()) > 0) {
111
-                        $queryString = '?' . http_build_query($this->query->all());
111
+                        $queryString = '?'.http_build_query($this->query->all());
112 112
                     }
113 113
 
114
-                    $response = new Redirect($this->getSchemeAndHttpHost() . $this->basePath . '/' . $userLang . $this->getPathInfo() . $queryString);
114
+                    $response = new Redirect($this->getSchemeAndHttpHost().$this->basePath.'/'.$userLang.$this->getPathInfo().$queryString);
115 115
                     $response->send();
116 116
                     exit();
117 117
                 }
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
         // check if pathway is the same with target and redirect to source from static routing
140 140
         if (Obj::isArray($aliasMap) && Arr::in($this->getPathInfo(), $aliasMap)) {
141 141
             $source = array_search($this->getPathInfo(), $aliasMap);
142
-            $targetUri = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
142
+            $targetUri = $this->getSchemeAndHttpHost().$this->getBasePath().'/';
143 143
             if (App::$Properties->get('multiLanguage') === true) {
144
-                $targetUri .= $this->language . '/';
144
+                $targetUri .= $this->language.'/';
145 145
             }
146 146
             $targetUri .= ltrim($source, '/');
147 147
             $response = new Redirect($targetUri);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     {
213 213
         $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo();
214 214
         if (!Str::startsWith('/', $route)) {
215
-            $route = '/' . $route;
215
+            $route = '/'.$route;
216 216
         }
217 217
         return $route;
218 218
     }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
      */
323 323
     public function getFullUrl()
324 324
     {
325
-        return $this->getSchemeAndHttpHost() . $this->getRequestUri();
325
+        return $this->getSchemeAndHttpHost().$this->getRequestUri();
326 326
     }
327 327
 
328 328
 }
329 329
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ffcms/Core/Debug/Manager.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
     /**
57 57
      * Add exception into debug bar and stop execute
58
-     * @param $e
58
+     * @param \Ffcms\Core\Exception\TemplateException $e
59 59
      * @throws \DebugBar\DebugBarException
60 60
      */
61 61
     public function addException($e)
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Table.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     /**
19 19
      * Construct table based on passed elements as array: properties, thead, tbody, rows, items etc
20 20
      * @param array $elements
21
-     * @return null
21
+     * @return null|string
22 22
      */
23 23
     public static function display($elements)
24 24
     {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -41,24 +41,24 @@  discard block
 block discarded – undo
41 41
         // init dom model
42 42
         $dom = new Dom();
43 43
         // draw response
44
-        $table = $dom->table(function () use ($dom, $elements, $selectOptions) {
44
+        $table = $dom->table(function() use ($dom, $elements, $selectOptions) {
45 45
             $res = null;
46 46
             // check if thead is defined
47 47
             if (isset($elements['thead']) && Obj::isArray($elements['thead']) && count($elements['thead']) > 0 && Obj::isArray($elements['thead']['titles'])) {
48 48
                 // add thead container
49
-                $res .= $dom->thead(function () use ($dom, $elements, $selectOptions) {
50
-                    return $dom->tr(function () use ($dom, $elements, $selectOptions) {
49
+                $res .= $dom->thead(function() use ($dom, $elements, $selectOptions) {
50
+                    return $dom->tr(function() use ($dom, $elements, $selectOptions) {
51 51
                         $tr = null;
52 52
                         foreach ($elements['thead']['titles'] as $order => $title) {
53 53
                             $th = htmlentities($title['text']);
54 54
                             // make global checkbox for selectable columns
55 55
                             if ($selectOptions !== false && $order + 1 === $selectOptions['attachOrder']) {
56
-                                $th = $dom->input(function () {
56
+                                $th = $dom->input(function() {
57 57
                                     return null;
58
-                                }, ['type' => 'checkbox', 'name' => 'selectAll']) . ' ' . $th;
58
+                                }, ['type' => 'checkbox', 'name' => 'selectAll']).' '.$th;
59 59
                             }
60 60
                             // build tr row collecting all th's
61
-                            $tr .= $dom->th(function () use ($th) {
61
+                            $tr .= $dom->th(function() use ($th) {
62 62
                                 return $th;
63 63
                             });
64 64
                         }
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
                         // sort td items inside row by key increment
78 78
                         ksort($row);
79 79
                         // add data in tr container
80
-                        $tr .= $dom->tr(function () use ($dom, $row, $selectOptions) {
80
+                        $tr .= $dom->tr(function() use ($dom, $row, $selectOptions) {
81 81
                             $td = null;
82 82
                             foreach ($row as $order => $item) {
83 83
                                 if (!Obj::isInt($order)) {
84 84
                                     continue;
85 85
                                 }
86 86
                                 // collect td item
87
-                                $td .= $dom->td(function () use ($dom, $order, $item, $selectOptions) {
87
+                                $td .= $dom->td(function() use ($dom, $order, $item, $selectOptions) {
88 88
                                     $text = null;
89 89
                                     // make text secure based on passed options
90 90
                                     if ($item['html'] === true) {
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
                                     }
99 99
                                     // check if selectable box is enabled and equal current order id
100 100
                                     if ($selectOptions !== false && $order === $selectOptions['attachOrder']) {
101
-                                        $text = $dom->input(function (){
101
+                                        $text = $dom->input(function() {
102 102
                                             return null;
103
-                                        }, Arr::merge($selectOptions['input'], ['value' => $text])) . ' ' . $text;
103
+                                        }, Arr::merge($selectOptions['input'], ['value' => $text])).' '.$text;
104 104
                                     }
105 105
                                     return $text;
106 106
                                 }, $item['property']);
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
             // build js code for "selectAll" checkbox
124 124
             self::buildSelectorHtml($selectOptions);
125 125
             // return response inside "form" tag
126
-            return $dom->form(function () use ($dom, $selectOptions, $table){
127
-                $table .= $dom->input(function () {
126
+            return $dom->form(function() use ($dom, $selectOptions, $table){
127
+                $table .= $dom->input(function() {
128 128
                     return null;
129 129
                 }, $selectOptions['button']);
130 130
                 return $table;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     private static function buildSelectorHtml(array $opt)
142 142
     {
143 143
         $js = '$(function () {
144
-            var targetSwitchbox = $(\'input[name="' . $opt['input']['name'] . '"]\');
144
+            var targetSwitchbox = $(\'input[name="' . $opt['input']['name'].'"]\');
145 145
             $(\'input[name="selectAll"]\').change(function() {
146 146
                 $(targetSwitchbox).each(function () {
147 147
                     $(this).prop(\'checked\', !$(this).is(\':checked\'));
Please login to merge, or discard this patch.