Completed
Push — master ( 8757d5...111d7a )
by Mihail
03:00
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/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   +14 added lines, -14 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
     /**
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
     {
156 156
         /** @var array $configs */
157 157
         $configs = \App::$Properties->getAll('default');
158
-        $httpHost = $configs['baseProto'] . '://' . $configs['baseDomain'];
158
+        $httpHost = $configs['baseProto'].'://'.$configs['baseDomain'];
159 159
         if ($configs['basePath'] !== '/') {
160
-            $httpHost .= $configs['basePath'] . '/';
160
+            $httpHost .= $configs['basePath'].'/';
161 161
         }
162 162
 
163 163
         // check if is this is URI not URL
164 164
         if (!Str::startsWith($httpHost, $uri)) {
165 165
             // check if lang is defined in URI or define it
166 166
             if ($lang !== null && $configs['multiLanguage'] && !Str::startsWith($lang, $uri)) {
167
-                $uri = $lang . '/' . ltrim($uri, '/');
167
+                $uri = $lang.'/'.ltrim($uri, '/');
168 168
             }
169 169
             // add basic httpHost data
170
-            $uri = rtrim($httpHost, '/') . '/' . ltrim($uri, '/');
170
+            $uri = rtrim($httpHost, '/').'/'.ltrim($uri, '/');
171 171
         }
172 172
 
173 173
         return $uri;
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
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 
60 60
         $basePath = trim(App::$Properties->get('basePath'), '/');
61 61
         if ($basePath !== null && Str::length($basePath) > 0) {
62
-            $basePath = '/' . $basePath;
62
+            $basePath = '/'.$basePath;
63 63
         }
64 64
 
65 65
         if (!defined('env_no_uri') || env_no_uri === false) {
66
-            $basePath .= '/' . strtolower(env_name);
66
+            $basePath .= '/'.strtolower(env_name);
67 67
         }
68 68
 
69 69
         // we never try to use path's without friendly url's
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             } else {
90 90
                 // try to find language in pathway
91 91
                 foreach (App::$Properties->get('languages') as $lang) {
92
-                    if (Str::startsWith('/' . $lang, $this->getPathInfo())) {
92
+                    if (Str::startsWith('/'.$lang, $this->getPathInfo())) {
93 93
                         $this->language = $lang;
94 94
                         $this->languageInPath = true;
95 95
                     }
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
                     // parse query string
117 117
                     $queryString = null;
118 118
                     if (count($this->query->all()) > 0) {
119
-                        $queryString = '?' . http_build_query($this->query->all());
119
+                        $queryString = '?'.http_build_query($this->query->all());
120 120
                     }
121 121
 
122 122
                     // build response with redirect to language-based path
123
-                    $response = new Redirect($this->getSchemeAndHttpHost() . $this->basePath . '/' . $userLang . $this->getPathInfo() . $queryString);
123
+                    $response = new Redirect($this->getSchemeAndHttpHost().$this->basePath.'/'.$userLang.$this->getPathInfo().$queryString);
124 124
                     $response->send();
125 125
                     exit();
126 126
                 }
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
             // find "new path" as binding uri slug
179 179
             $binding = array_search($pathway, $map, true);
180 180
             // build url to redirection
181
-            $url = $this->getSchemeAndHttpHost() . $this->getBasePath() . '/';
181
+            $url = $this->getSchemeAndHttpHost().$this->getBasePath().'/';
182 182
             if (App::$Properties->get('multiLanguage')) {
183
-                $url .= $this->language . '/';
183
+                $url .= $this->language.'/';
184 184
             }
185 185
             $url .= ltrim($binding, '/');
186 186
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     {
271 271
         $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo();
272 272
         if (!Str::startsWith('/', $route)) {
273
-            $route = '/' . $route;
273
+            $route = '/'.$route;
274 274
         }
275 275
         return $route;
276 276
     }
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
      */
381 381
     public function getFullUrl()
382 382
     {
383
-        return $this->getSchemeAndHttpHost() . $this->getRequestUri();
383
+        return $this->getSchemeAndHttpHost().$this->getRequestUri();
384 384
     }
385 385
 
386 386
     /**
Please login to merge, or discard this patch.
src/Ffcms/Core/Filter/Native.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.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
     /**
170 170
      * Filter ['object', 'phone']
171 171
      * @param string $object
172
-     * @return bool|int
172
+     * @return boolean
173 173
      */
174 174
     public static function phone($object)
175 175
     {
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   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -40,24 +40,24 @@  discard block
 block discarded – undo
40 40
         // init dom model
41 41
         $dom = new Dom();
42 42
         // draw response
43
-        $table = $dom->table(function () use ($dom, $elements, $selectOptions) {
43
+        $table = $dom->table(function() use ($dom, $elements, $selectOptions) {
44 44
             $res = null;
45 45
             // check if thead is defined
46 46
             if (isset($elements['thead']) && Obj::isArray($elements['thead']) && count($elements['thead']) > 0 && Obj::isArray($elements['thead']['titles'])) {
47 47
                 // add thead container
48
-                $res .= $dom->thead(function () use ($dom, $elements, $selectOptions) {
49
-                    return $dom->tr(function () use ($dom, $elements, $selectOptions) {
48
+                $res .= $dom->thead(function() use ($dom, $elements, $selectOptions) {
49
+                    return $dom->tr(function() use ($dom, $elements, $selectOptions) {
50 50
                         $tr = null;
51 51
                         foreach ($elements['thead']['titles'] as $order => $title) {
52 52
                             $th = htmlentities($title['text']);
53 53
                             // make global checkbox for selectable columns
54 54
                             if ($selectOptions !== false && $order + 1 === $selectOptions['attachOrder']) {
55
-                                $th = $dom->input(function () {
55
+                                $th = $dom->input(function() {
56 56
                                     return null;
57
-                                }, ['type' => 'checkbox', 'name' => 'selectAll']) . ' ' . $th;
57
+                                }, ['type' => 'checkbox', 'name' => 'selectAll']).' '.$th;
58 58
                             }
59 59
                             // build tr row collecting all th's
60
-                            $tr .= $dom->th(function () use ($th) {
60
+                            $tr .= $dom->th(function() use ($th) {
61 61
                                 return $th;
62 62
                             });
63 63
                         }
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
                         // sort td items inside row by key increment
77 77
                         ksort($row);
78 78
                         // add data in tr container
79
-                        $tr .= $dom->tr(function () use ($dom, $row, $selectOptions) {
79
+                        $tr .= $dom->tr(function() use ($dom, $row, $selectOptions) {
80 80
                             $td = null;
81 81
                             foreach ($row as $order => $item) {
82 82
                                 if (!Obj::isInt($order)) {
83 83
                                     continue;
84 84
                                 }
85 85
                                 // collect td item
86
-                                $td .= $dom->td(function () use ($dom, $order, $item, $selectOptions) {
86
+                                $td .= $dom->td(function() use ($dom, $order, $item, $selectOptions) {
87 87
                                     $text = null;
88 88
                                     // make text secure based on passed options
89 89
                                     if ($item['html'] === true) {
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
                                     }
98 98
                                     // check if selectable box is enabled and equal current order id
99 99
                                     if ($selectOptions !== false && $order === $selectOptions['attachOrder']) {
100
-                                        $text = $dom->input(function (){
100
+                                        $text = $dom->input(function() {
101 101
                                             return null;
102
-                                        }, Arr::merge($selectOptions['selector'], ['value' => htmlentities($text)])) . ' ' . $text;
102
+                                        }, Arr::merge($selectOptions['selector'], ['value' => htmlentities($text)])).' '.$text;
103 103
                                     }
104 104
                                     return $text;
105 105
                                 }, $item['property']);
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
             // build js code for "selectAll" checkbox
123 123
             self::buildSelectorHtml($selectOptions);
124 124
             // return response inside "form" tag
125
-            return $dom->form(function () use ($dom, $selectOptions, $table) {
125
+            return $dom->form(function() use ($dom, $selectOptions, $table) {
126 126
                 foreach ($selectOptions['buttons'] as $btn) {
127 127
                     if (!Obj::isArray($btn)) {
128 128
                         continue;
129 129
                     }
130
-                    $table .= $dom->input(function(){
130
+                    $table .= $dom->input(function() {
131 131
                         return null;
132
-                    }, $btn) . ' ';
132
+                    }, $btn).' ';
133 133
                 }
134 134
                 return $table;
135 135
             }, $selectOptions['form']);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     private static function buildSelectorHtml(array $opt)
146 146
     {
147 147
         $js = '$(function () {
148
-            var targetSwitchbox = $(\'input[name="' . $opt['selector']['name'] . '"]\');
148
+            var targetSwitchbox = $(\'input[name="' . $opt['selector']['name'].'"]\');
149 149
             $(\'input[name="selectAll"]\').change(function() {
150 150
                 $(targetSwitchbox).each(function () {
151 151
                     $(this).prop(\'checked\', !$(this).is(\':checked\'));
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Text.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
                 $breakerPos = mb_strpos($text, '<br', null, 'UTF-8');
36 36
             } else {
37 37
                 // add length('</p>')
38
-                $breakerPos+= 4;
38
+                $breakerPos += 4;
39 39
             }
40 40
             // cut text from position caret before </p> (+4 symbols to save item as valid)
41 41
             if ($breakerPos !== false) {
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/System/NativeGenerator.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   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             $purifier = App::$Memory->get('object.purifier.helpers');
25 25
         } else {
26 26
             $config = \HTMLPurifier_Config::createDefault();
27
-            $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/');
27
+            $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/');
28 28
             $config->set('AutoFormat.AutoParagraph', false);
29 29
 
30 30
             // allow use target=_blank for links
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
         $build = null;
65 65
         foreach ($property as $p => $v) {
66 66
             if ($v === null || $v === false || $v === true) {
67
-                $build .= ' ' . self::nohtml($p);
67
+                $build .= ' '.self::nohtml($p);
68 68
             } else {
69
-                $build .= ' ' . self::nohtml($p) . '="' . self::nohtml($v) . '"';
69
+                $build .= ' '.self::nohtml($p).'="'.self::nohtml($v).'"';
70 70
             }
71 71
         }
72 72
         return $build;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public static function buildSingleTag($tagName, array $property = null, $closeSlash = true)
83 83
     {
84
-        return '<' . self::nohtml($tagName) . self::applyProperty($property) . ($closeSlash ? '/>' : '>');
84
+        return '<'.self::nohtml($tagName).self::applyProperty($property).($closeSlash ? '/>' : '>');
85 85
     }
86 86
 
87 87
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $value = self::nohtml($value);
100 100
         }
101 101
         
102
-        return '<' . $tagName . self::applyProperty($property) . '>' . $value . '</' . $tagName . '>';
102
+        return '<'.$tagName.self::applyProperty($property).'>'.$value.'</'.$tagName.'>';
103 103
     }
104 104
 
105 105
     /**
@@ -141,15 +141,15 @@  discard block
 block discarded – undo
141 141
                 if (!Str::contains('/', $elementPoint) || count($elementArray) < 2) {
142 142
                     $active = $elementPoint === $currentPoint;
143 143
                 } else {
144
-                    $elementPoint = $elementArray[0] . '/' . $elementArray[1];
144
+                    $elementPoint = $elementArray[0].'/'.$elementArray[1];
145 145
                     $active = Str::startsWith($elementPoint, $currentPoint);
146 146
                 }
147 147
                 break;
148 148
             case 'id':
149 149
                 $elementArray = explode('/', $elementPoint);
150
-                $elementPoint = $elementArray[0] . '/' . $elementArray[1];
150
+                $elementPoint = $elementArray[0].'/'.$elementArray[1];
151 151
                 if (null !== $elementArray[2]) {
152
-                    $elementPoint .= '/' . $elementArray[2];
152
+                    $elementPoint .= '/'.$elementArray[2];
153 153
                 }
154 154
 
155 155
                 $active = Str::startsWith($elementPoint, $currentPoint);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     public static function convertLink($uri)
207 207
     {
208
-        $link = App::$Alias->baseUrl . '/';
208
+        $link = App::$Alias->baseUrl.'/';
209 209
         if (Obj::isArray($uri)) {
210 210
             $link .= Url::buildPathway($uri);
211 211
         } elseif (Str::startsWith('http', $uri)) {
Please login to merge, or discard this patch.