Completed
Push — master ( 2f8bc7...807794 )
by Mihail
02:57
created
src/Ffcms/Core/Helper/Type/Str.php 2 patches
Doc Comments   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * Find first entry in $string before $delimiter
53 53
      * @param string $string
54 54
      * @param string $delimiter
55
-     * @return string|bool
55
+     * @return string
56 56
      */
57 57
     public static function firstIn($string, $delimiter)
58 58
     {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @param string $string
65 65
      * @param string $delimiter
66 66
      * @param bool $withoutDelimiter
67
-     * @return string|bool
67
+     * @return false|string
68 68
      */
69 69
     public static function lastIn($string, $delimiter, $withoutDelimiter = false)
70 70
     {
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     /**
278 278
      * Check is $string sounds like a phone number
279 279
      * @param string $string
280
-     * @return int
280
+     * @return boolean
281 281
      */
282 282
     public static function isPhone($string)
283 283
     {
@@ -286,9 +286,6 @@  discard block
 block discarded – undo
286 286
 
287 287
     /**
288 288
      * Concat string with add string by separator
289
-     * @param string $separator
290
-     * @param string $string1
291
-     * @param string $string2
292 289
      */
293 290
     public static function concat()
294 291
     {
Please login to merge, or discard this patch.
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.
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/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,26 +110,26 @@  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'])) {
127 127
                         $brand = Url::link($elements['brand']['link'], $elements['brand']['text'], ['class' => 'navbar-brand']);
128 128
                     }
129
-                    return $collapseButton . $brand;
129
+                    return $collapseButton.$brand;
130 130
                 }, ['class' => 'navbar-header']);
131 131
                 // return header and body concat
132
-                return $header . $body;
132
+                return $header.$body;
133 133
             }, $elements['container']);
134 134
         }, $elements['nav']);
135 135
     }
Please login to merge, or discard this patch.
src/Ffcms/Core/Managers/EventManager.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,9 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Ffcms\Core\App;
5 5
 use Ffcms\Core\Helper\Type\Obj;
6
-use Ffcms\Core\Helper\Type\Str;
7
-use Ffcms\Core\Helper\FileSystem\Directory;
8
-use Ffcms\Core\Helper\FileSystem\File;
9 6
 
10 7
 /**
11 8
  * Class EventManager. Control and run events.
Please login to merge, or discard this patch.
src/Ffcms/Core/Managers/BootManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
     {
88 88
         // list app root's
89 89
         foreach ($this->appRoots as $app) {
90
-            $app .= '/Apps/Controller/' . env_name;
90
+            $app .= '/Apps/Controller/'.env_name;
91 91
             $files = File::listFiles($app, ['.php'], true);
92 92
             foreach ($files as $file) {
93 93
                 // define full class name with namespace
94
-                $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file);
94
+                $class = 'Apps\Controller\\'.env_name.'\\'.Str::cleanExtension($file);
95 95
                 // check if class exists (must be loaded over autoloader), boot method exist and this is controller instanceof
96 96
                 if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Controller', true)) {
97 97
                     $this->objects[] = $class;
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
 
102 102
         // list widget root's
103 103
         foreach ($this->widgetRoots as $widget) {
104
-            $widget .= '/Widgets/' . env_name;
104
+            $widget .= '/Widgets/'.env_name;
105 105
             // widgets are packed in directory, classname should be the same with root directory name
106 106
             $dirs = Directory::scan($widget, GLOB_ONLYDIR, true);
107 107
             foreach ($dirs as $instance) {
108
-                $class = 'Widgets\\' . env_name . '\\' . $instance . '\\' . $instance;
108
+                $class = 'Widgets\\'.env_name.'\\'.$instance.'\\'.$instance;
109 109
                 if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Widget', true)) {
110 110
                     $this->objects[] = $class;
111 111
                 }
Please login to merge, or discard this patch.