Completed
Push — master ( b7290a...f2cd13 )
by Mihail
04:20
created
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/Filter/Native.php 1 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/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/Properties.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
         }
47 47
 
48 48
         // try to load from file
49
-        $configFile = ucfirst(Str::lowerCase($configName)) . '.php';
50
-        if (File::exist('/Private/Config/' . $configFile)) {
51
-            $this->data[$configName] = File::inc('/Private/Config/' . $configFile, true);
49
+        $configFile = ucfirst(Str::lowerCase($configName)).'.php';
50
+        if (File::exist('/Private/Config/'.$configFile)) {
51
+            $this->data[$configName] = File::inc('/Private/Config/'.$configFile, true);
52 52
             return true;
53 53
         }
54 54
 
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function writeConfig($configFile, array $data)
141 141
     {
142
-        $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php';
142
+        $path = '/Private/Config/'.ucfirst(Str::lowerCase($configFile)).'.php';
143 143
         if (!File::exist($path) || !File::writable($path)) {
144 144
             return false;
145 145
         }
146
-        $saveData = '<?php return ' . Arr::exportVar($data) . ';';
146
+        $saveData = '<?php return '.Arr::exportVar($data).';';
147 147
         File::write($path, $saveData);
148 148
         return true;
149 149
     }
Please login to merge, or discard this patch.
src/Ffcms/Core/Managers/CronManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             return false;
77 77
         }
78 78
 
79
-        $callback = (string)$class . '::' . (string)$method;
79
+        $callback = (string)$class.'::'.(string)$method;
80 80
 
81 81
         // add instance to cron task manager
82 82
         if (!isset($this->configs['instances'][$callback])) {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function remove($class, $method)
96 96
     {
97
-        $callback = $class . '::' . $method;
97
+        $callback = $class.'::'.$method;
98 98
         if (isset($this->configs['instances'][$callback])) {
99 99
             unset($this->configs['instances'][$callback], $this->configs['log'][$callback]);
100 100
             App::$Properties->writeConfig('Cron', $this->configs);
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Form/RadioField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $options = $this->properties['options'];
43 43
         unset($this->properties['options']);
44 44
         if (!Obj::isArray($options) || count($options) < 1) {
45
-            throw new SyntaxException('Radio field ' . self::nohtml($this->name) . ' have no options passed');
45
+            throw new SyntaxException('Radio field '.self::nohtml($this->name).' have no options passed');
46 46
         }
47 47
 
48 48
         // value is not used there
Please login to merge, or discard this patch.
src/Ffcms/Core/Managers/BootManager.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
         // check if cache is enabled
40 40
         if (App::$Cache !== null) {
41 41
             // try to get bootable class map from cache, or initialize parsing
42
-            if (App::$Cache->get('boot.' . env_name . '.class.map') !== null) {
43
-                $this->objects = App::$Cache->get('boot.' . env_name . '.class.map');
42
+            if (App::$Cache->get('boot.'.env_name.'.class.map') !== null) {
43
+                $this->objects = App::$Cache->get('boot.'.env_name.'.class.map');
44 44
             } else {
45 45
                 $this->compileBootableClasses();
46
-                App::$Cache->set('boot.' . env_name . '.class.map', $this->objects, static::CACHE_TREE_TIME);
46
+                App::$Cache->set('boot.'.env_name.'.class.map', $this->objects, static::CACHE_TREE_TIME);
47 47
             }
48 48
         }
49 49
     }
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
     {
90 90
         // list app root's
91 91
         foreach ($this->appRoots as $app) {
92
-            $app .= '/Apps/Controller/' . env_name;
92
+            $app .= '/Apps/Controller/'.env_name;
93 93
             $files = File::listFiles($app, ['.php'], true);
94 94
             foreach ($files as $file) {
95 95
                 // define full class name with namespace
96
-                $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file);
96
+                $class = 'Apps\Controller\\'.env_name.'\\'.Str::cleanExtension($file);
97 97
                 // check if class exists (must be loaded over autoloader), boot method exist and this is controller instanceof
98 98
                 if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Controller', true)) {
99 99
                     $this->objects[] = $class;
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
 
104 104
         // list widget root's
105 105
         foreach ($this->widgetRoots as $widget) {
106
-            $widget .= '/Widgets/' . env_name;
106
+            $widget .= '/Widgets/'.env_name;
107 107
             // widgets are packed in directory, classname should be the same with root directory name
108 108
             $dirs = Directory::scan($widget, GLOB_ONLYDIR, true);
109 109
             if (!Obj::isArray($dirs)) {
110 110
                 continue;
111 111
             }
112 112
             foreach ($dirs as $instance) {
113
-                $class = 'Widgets\\' . env_name . '\\' . $instance . '\\' . $instance;
113
+                $class = 'Widgets\\'.env_name.'\\'.$instance.'\\'.$instance;
114 114
                 if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Widget', true)) {
115 115
                     $this->objects[] = $class;
116 116
                 }
Please login to merge, or discard this patch.