Completed
Push — master ( dbc7b1...93957e )
by Mihail
02:52
created
src/Ffcms/Core/Helper/HTML/Form.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function start()
76 76
     {
77
-        return '<form' . self::applyProperty($this->formProperty) . '>';
77
+        return '<form'.self::applyProperty($this->formProperty).'>';
78 78
     }
79 79
 
80 80
     /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         if ($this->model === null) {
92 92
             if (App::$Debug !== null) {
93
-                App::$Debug->addMessage('Form model is not defined for field name: [' . strip_tags($object) . ']');
93
+                App::$Debug->addMessage('Form model is not defined for field name: ['.strip_tags($object).']');
94 94
             }
95 95
             return null;
96 96
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         // check if model contains current tag name as property
105 105
         if (!property_exists($this->model, $propertyName)) {
106 106
             if (App::$Debug !== null) {
107
-                App::$Debug->addMessage('Form field ["' . $object . '"] is not defined in model: [' . get_class($this->model) . ']', 'error');
107
+                App::$Debug->addMessage('Form field ["'.$object.'"] is not defined in model: ['.get_class($this->model).']', 'error');
108 108
             }
109 109
             return null;
110 110
         }
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
         }
120 120
         
121 121
         // prepare labels text and label "for" attr 
122
-        $labelFor = $this->name . '-' . $propertyName;
122
+        $labelFor = $this->name.'-'.$propertyName;
123 123
         $labelText = $this->model->getLabel($object);
124 124
         $itemValue = $this->model->{$propertyName};
125 125
         // sounds like a dot-separated $object
126 126
         if ($propertyName !== $object) {
127 127
             $nesting = trim(strstr($object, '.'), '.');
128
-            $labelFor .= '-' . Str::replace('.', '-', $nesting);
128
+            $labelFor .= '-'.Str::replace('.', '-', $nesting);
129 129
             $itemValue = Arr::getByPath($nesting, $itemValue);
130 130
         }
131 131
         //$itemBody = $this->dataTypeTag($type, $object, $itemValue, $property);
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     public function submitButton($title, array $property = [])
156 156
     {
157 157
         $property['type'] = 'submit';
158
-        $property['name'] = $this->name . '[submit]';
158
+        $property['name'] = $this->name.'[submit]';
159 159
         $property['value'] = $title;
160 160
         return self::buildSingleTag('input', $property);
161 161
     }
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
     {
170 170
         // pre-validate form fields based on model rules and jquery.validation
171 171
         if ($validate) {
172
-            App::$Alias->addPlainCode('js', '$().ready(function() { $("#' . $this->name . '").validate(); });');
172
+            App::$Alias->addPlainCode('js', '$().ready(function() { $("#'.$this->name.'").validate(); });');
173 173
             App::$Alias->setCustomLibrary('js', '/vendor/bower/jquery-validation/dist/jquery.validate.min.js');
174 174
             if (App::$Request->getLanguage() !== 'en') {
175
-                $localeFile = '/vendor/bower/jquery-validation/src/localization/messages_' . App::$Request->getLanguage() . '.js';
175
+                $localeFile = '/vendor/bower/jquery-validation/src/localization/messages_'.App::$Request->getLanguage().'.js';
176 176
                 if (File::exist($localeFile)) {
177 177
                     App::$Alias->setCustomLibrary('js', $localeFile);
178 178
                 }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 $formName = $this->model->getFormName();
184 184
                 if (Obj::isArray($badAttr) && count($badAttr) > 0) {
185 185
                     foreach ($badAttr as $attr) {
186
-                        $itemId = $formName . '-' . $attr;
186
+                        $itemId = $formName.'-'.$attr;
187 187
                         $render = App::$View->render($this->structLayer['jsnotify'], ['itemId' => $itemId]);
188 188
                         App::$Alias->addPlainCode('js', $render);
189 189
                     }
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Type/Arr.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -118,16 +118,16 @@
 block discarded – undo
118 118
                         return 'true';
119 119
                     }
120 120
                 }
121
-                return '\'' . $var . '\'';
121
+                return '\''.$var.'\'';
122 122
             case 'array':
123 123
                 $indexed = array_keys($var) === range(0, count($var) - 1);
124 124
                 $row = [];
125 125
                 foreach ($var as $key => $value) {
126
-                    $row[] = $indent . "\t"
127
-                        . ($indexed ? null : self::exportVar($key, null, $guessTypes) . ' => ')
128
-                        . self::exportVar($value, $indent . "\t", $guessTypes);
126
+                    $row[] = $indent."\t"
127
+                        . ($indexed ? null : self::exportVar($key, null, $guessTypes).' => ')
128
+                        . self::exportVar($value, $indent."\t", $guessTypes);
129 129
                 }
130
-                return "[\n" . implode(",\n", $row) . "\n" . $indent . ']';
130
+                return "[\n".implode(",\n", $row)."\n".$indent.']';
131 131
             case 'boolean':
132 132
                 return $var ? 'true' : 'false';
133 133
             default:
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Environment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,6 @@
 block discarded – undo
67 67
             return 'error';
68 68
         }
69 69
 
70
-        return (int)$load . '%';
70
+        return (int)$load.'%';
71 71
     }
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ffcms/Core/Alias.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -93,22 +93,22 @@
 block discarded – undo
93 93
         }
94 94
         $this->baseUrlNoLang = $this->baseUrl;
95 95
         if (App::$Request->languageInPath() && App::$Request->getLanguage() !== null) {
96
-            $this->baseUrl .= '/' . App::$Request->getLanguage();
96
+            $this->baseUrl .= '/'.App::$Request->getLanguage();
97 97
         }
98 98
 
99 99
         // build vendor libs alias
100
-        $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl . '/vendor/bower/jquery/dist/jquery.min.js';
101
-        $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/css/bootstrap.min.css';
102
-        $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/js/bootstrap.min.js';
103
-        $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl . '/vendor/bower/components-font-awesome/css/font-awesome.min.css';
104
-        $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/jquery-ui.min.js';
105
-        $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css';
100
+        $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl.'/vendor/bower/jquery/dist/jquery.min.js';
101
+        $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/css/bootstrap.min.css';
102
+        $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/js/bootstrap.min.js';
103
+        $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl.'/vendor/bower/components-font-awesome/css/font-awesome.min.css';
104
+        $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/jquery-ui.min.js';
105
+        $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css';
106 106
 
107 107
         $themeAll = App::$Properties->get('theme');
108 108
         if (!isset($themeAll[env_name]) || Str::length($themeAll[env_name]) < 1) {
109 109
             $themeAll[env_name] = 'default';
110 110
         }
111
-        $this->currentViewUrl = $this->scriptUrl . '/Apps/View/' . env_name . '/' . $themeAll[env_name];
111
+        $this->currentViewUrl = $this->scriptUrl.'/Apps/View/'.env_name.'/'.$themeAll[env_name];
112 112
     }
113 113
 
114 114
     /**
Please login to merge, or discard this patch.
src/Ffcms/Core/Event/EventManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function on($event, \Closure $callback)
39 39
     {
40 40
         // check if event is a single string and parse it to array single item
41
-        if (! Obj::isArray($event)) {
41
+        if (!Obj::isArray($event)) {
42 42
             $event = [$event];
43 43
         }
44 44
         
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public static function makeBoot($loader = false)
109 109
     {
110
-        $controllers = [root . '/Apps/Controller/' . env_name];
110
+        $controllers = [root.'/Apps/Controller/'.env_name];
111 111
         // get custom apps directories from composer autoloader maps
112 112
         if ($loader !== false) {
113 113
             $sources = $loader->getPrefixes();
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 // each every one add a new path to controllers map
117 117
                 $controllers = [];
118 118
                 foreach ($sources['Apps\\'] as $path) {
119
-                    $controllers[] = $path . '/Apps/Controller/' . env_name;
119
+                    $controllers[] = $path.'/Apps/Controller/'.env_name;
120 120
                 }
121 121
             }
122 122
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             // foreach all files in list
132 132
             foreach ($list as $file) {
133 133
                 // define full class name with namespace
134
-                $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file);
134
+                $class = 'Apps\Controller\\'.env_name.'\\'.Str::cleanExtension($file);
135 135
                 // check if class exists (must be loaded over autoloader)
136 136
                 if (class_exists($class)) {
137 137
                     // check if static method boot is exists
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] = @include(root . '/Private/Config/' . $configFile);
49
+        $configFile = ucfirst(Str::lowerCase($configName)).'.php';
50
+        if (File::exist('/Private/Config/'.$configFile)) {
51
+            $this->data[$configName] = @include(root.'/Private/Config/'.$configFile);
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/Arch/Controller.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
         if ($this->layout === null) {
50 50
             $content = $this->response;
51 51
         } else {
52
-            $layoutPath = App::$Alias->currentViewPath . '/layout/' . $this->layout . '.php';
52
+            $layoutPath = App::$Alias->currentViewPath.'/layout/'.$this->layout.'.php';
53 53
             if (!File::exist($layoutPath)) {
54
-                throw new NativeException('Layout not founded: ' . $layoutPath);
54
+                throw new NativeException('Layout not founded: '.$layoutPath);
55 55
             }
56 56
 
57 57
             $body = $this->response;
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
             // set custom css library's not included on static call
71 71
             $cssIncludeCode = App::$View->showCodeLink('css');
72 72
             if (!Str::likeEmpty($cssIncludeCode)) {
73
-                $content = Str::replace('</head>', $cssIncludeCode . '</head>', $content);
73
+                $content = Str::replace('</head>', $cssIncludeCode.'</head>', $content);
74 74
             }
75 75
 
76 76
             // add debug bar
77 77
             if (App::$Debug !== null) {
78 78
                 $content = Str::replace(
79 79
                     ['</body>', '</head>'],
80
-                    [App::$Debug->renderOut() . '</body>', App::$Debug->renderHead() . '</head>'],
80
+                    [App::$Debug->renderOut().'</body>', App::$Debug->renderHead().'</head>'],
81 81
                     $content);
82 82
             }
83 83
 
Please login to merge, or discard this patch.
src/Ffcms/Core/Arch/Widget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
         // check if class exist
28 28
         if (!class_exists(self::$class)) {
29
-            return 'Error: Widget is not founded: ' . App::$Security->strip_tags(self::$class);
29
+            return 'Error: Widget is not founded: '.App::$Security->strip_tags(self::$class);
30 30
         }
31 31
 
32 32
         // init class and pass properties
Please login to merge, or discard this patch.
src/Ffcms/Core/Network/Response.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@
 block discarded – undo
22 22
     {
23 23
         $to = trim($to, '/');
24 24
         if (false === $full && !Str::startsWith(App::$Alias->baseUrl, $to)) {
25
-            $to = App::$Alias->baseUrl . '/' . $to;
25
+            $to = App::$Alias->baseUrl.'/'.$to;
26 26
         }
27 27
         $redirect = new FoundationRedirect($to);
28 28
         $redirect->send();
29
-        exit('Redirecting to ' . $to . ' ...');
29
+        exit('Redirecting to '.$to.' ...');
30 30
     }
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.