Completed
Push — master ( f8c7e1...7855c2 )
by Alexey
06:00
created
system/modules/Widgets/appAdminControllers/WidgetsController.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
                     $params = json_decode($widget->widget_params, true);
37 37
                     if ($params) {
38 38
                         foreach ($params as $param) {
39
-                            if (!isset($widgetCode[$i]))
40
-                                break;
39
+                            if (!isset($widgetCode[$i])) {
40
+                                                            break;
41
+                            }
41 42
                             if ($param['type'] == 'select') {
42 43
                                 $item = $param['model']::get($widgetCode[$i++]);
43 44
                                 if ($item) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $widget = false; //Widget::get($widgetCode[0], 'widget_filename');
31 31
 
32 32
             if ($widget) {
33
-                $text .= $widget->widget_name . "\n";
33
+                $text .= $widget->widget_name."\n";
34 34
                 $i = 1;
35 35
                 if (isset($widgetCode[$i]) && $widget->widget_params) {
36 36
                     $params = json_decode($widget->widget_params, true);
@@ -41,28 +41,28 @@  discard block
 block discarded – undo
41 41
                             if ($param['type'] == 'select') {
42 42
                                 $item = $param['model']::get($widgetCode[$i++]);
43 43
                                 if ($item) {
44
-                                    $text .= $param['name'] . ': ' . $item->$param['showCol'] . "\n";
44
+                                    $text .= $param['name'].': '.$item->$param['showCol']."\n";
45 45
                                 } else {
46 46
                                     $text .= $widgetCode[$i - 1];
47 47
                                 }
48 48
                             } else {
49 49
                                 $value = $widgetCode[$i++];
50 50
                                 if (mb_strlen($value, 'utf-8') > 50) {
51
-                                    $value = mb_substr($value, 0, 50) . '...';
51
+                                    $value = mb_substr($value, 0, 50).'...';
52 52
                                 }
53
-                                $text .= $param['name'] . ': ' . $value . "\n";
53
+                                $text .= $param['name'].': '.$value."\n";
54 54
                             }
55 55
                         }
56 56
                     }
57 57
                 } else {
58 58
                     unset($widgetCode[0]);
59 59
                     foreach ($widgetCode as $item) {
60
-                        $text .= $item . "\n";
60
+                        $text .= $item."\n";
61 61
                     }
62 62
                 }
63 63
             } else {
64 64
                 foreach ($widgetCode as $item) {
65
-                    $text .= $item . "\n";
65
+                    $text .= $item."\n";
66 66
                 }
67 67
             }
68 68
         } else {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         header('Content-type: image/png');
73 73
         // шрифт
74
-        $font = dirname(__FILE__) . '/../fonts/Cousine/Cousine-Regular.ttf';
74
+        $font = dirname(__FILE__).'/../fonts/Cousine/Cousine-Regular.ttf';
75 75
         // вычисляем сколько места займёт текст
76 76
         $bbox = imageftbbox(10, 0, $font, $text);
77 77
 
Please login to merge, or discard this patch.
system/program/setup/modules/Main/appSetupControllers/MainController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                 if (empty($config['failTry'])) {
32 32
                     $config['failTry'] = 1;
33 33
                 } else {
34
-                    $config['failTry'] ++;
34
+                    $config['failTry']++;
35 35
                 }
36 36
                 Config::save('share', $config);
37 37
             }
Please login to merge, or discard this patch.
system/modules/Files/models/File.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -83,6 +83,9 @@
 block discarded – undo
83 83
         return null;
84 84
     }
85 85
 
86
+    /**
87
+     * @return string
88
+     */
86 89
     function colName()
87 90
     {
88 91
         return "{$this->activeForm->requestFormName}[{$this->activeForm->modelName}][{$this->colName}]";
Please login to merge, or discard this patch.
system/modules/Migrations/install_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.
system/Inji/Inji.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * 
44 44
      * @param string $eventName
45 45
      * @param string $listenCode
46
-     * @param array|closure $callback
46
+     * @param Closure $callback
47 47
      * @param boolean $save
48 48
      */
49 49
     function listen($eventName, $listenCode, $callback, $save = false)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
     public function listen($eventName, $listenCode, $callback, $save = false)
50 50
     {
51 51
         if ($save) {
52
-            $config = Config::custom(App::$primary->path . '/config/events.php');
52
+            $config = Config::custom(App::$primary->path.'/config/events.php');
53 53
             $config[$eventName][$listenCode] = serialize($callback);
54
-            Config::save(App::$primary->path . '/config/events.php', $config);
54
+            Config::save(App::$primary->path.'/config/events.php', $config);
55 55
         } else {
56 56
             $this->_listeners[$eventName][$listenCode] = $callback;
57 57
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if (!empty($this->_listeners[$eventName])) {
76 76
             $listeners = $this->_listeners[$eventName];
77 77
         }
78
-        $config = Config::custom(App::$primary->path . '/config/events.php');
78
+        $config = Config::custom(App::$primary->path.'/config/events.php');
79 79
         if (!empty($config[$eventName])) {
80 80
             foreach ($config[$eventName] as $listenCode => $callback) {
81 81
                 $listeners[$listenCode] = (@unserialize($callback) !== false) ? unserialize($callback) : $callback;
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
     public function unlisten($eventName, $listenCode, $save = false)
111 111
     {
112 112
         if ($save) {
113
-            $config = Config::custom(App::$primary->path . '/config/events.php');
113
+            $config = Config::custom(App::$primary->path.'/config/events.php');
114 114
             if (!empty($config[$eventName][$listenCode])) {
115 115
                 unset($config[$eventName][$listenCode]);
116
-                Config::save(App::$primary->path . '/config/events.php', $config);
116
+                Config::save(App::$primary->path.'/config/events.php', $config);
117 117
             }
118 118
         }
119 119
         if (!empty($this->_listeners[$eventName][$listenCode])) {
Please login to merge, or discard this patch.
system/Inji/Config.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@
 block discarded – undo
47 47
             return self::$_configs['custom'][$path];
48 48
         }
49 49
 
50
-        if (!file_exists($path))
51
-            return [];
50
+        if (!file_exists($path)) {
51
+                    return [];
52
+        }
52 53
 
53 54
         return self::$_configs['custom'][$path] = include $path;
54 55
     }
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
             return self::$_configs['system'];
29 29
         }
30 30
 
31
-        if (!file_exists(INJI_SYSTEM_DIR . '/config/config.php')) {
31
+        if (!file_exists(INJI_SYSTEM_DIR.'/config/config.php')) {
32 32
             return [];
33 33
         }
34 34
 
35
-        return self::$_configs['system'] = include INJI_SYSTEM_DIR . '/config/config.php';
35
+        return self::$_configs['system'] = include INJI_SYSTEM_DIR.'/config/config.php';
36 36
     }
37 37
 
38 38
     /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             return self::$_configs['app'][$app->name];
69 69
         }
70 70
 
71
-        $path = $app->path . "/config/config.php";
71
+        $path = $app->path."/config/config.php";
72 72
         if (!file_exists($path)) {
73 73
             return [];
74 74
         }
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
             if (isset(self::$_configs['shareModules'][$module])) {
89 89
                 return self::$_configs['shareModules'][$module];
90 90
             }
91
-            $path = INJI_PROGRAM_DIR . "/config/modules/{$module}.php";
91
+            $path = INJI_PROGRAM_DIR."/config/modules/{$module}.php";
92 92
         } else {
93 93
             if (isset(self::$_configs['share'])) {
94 94
                 return self::$_configs['share'];
95 95
             }
96
-            $path = INJI_PROGRAM_DIR . "/config/config.php";
96
+            $path = INJI_PROGRAM_DIR."/config/config.php";
97 97
         }
98 98
         if (!file_exists($path)) {
99
-            if (file_exists(INJI_SYSTEM_DIR . "/modules/{$module}/defaultConfig.php")) {
100
-                $path = INJI_SYSTEM_DIR . "/modules/{$module}/defaultConfig.php";
99
+            if (file_exists(INJI_SYSTEM_DIR."/modules/{$module}/defaultConfig.php")) {
100
+                $path = INJI_SYSTEM_DIR."/modules/{$module}/defaultConfig.php";
101 101
             } else {
102 102
                 return [];
103 103
             }
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
             return self::$_configs['module'][$appName][$module_name];
137 137
         }
138 138
 
139
-        $path = $appPath . "/config/modules/{$module_name}.php";
139
+        $path = $appPath."/config/modules/{$module_name}.php";
140 140
         if (!file_exists($path)) {
141
-            $path = INJI_SYSTEM_DIR . "/modules/{$module_name}/defaultConfig.php";
141
+            $path = INJI_SYSTEM_DIR."/modules/{$module_name}/defaultConfig.php";
142 142
         }
143 143
 
144 144
 
@@ -163,27 +163,27 @@  discard block
 block discarded – undo
163 163
         }
164 164
         switch ($type) {
165 165
             case 'system':
166
-                $path = INJI_SYSTEM_DIR . '/config/config.php';
166
+                $path = INJI_SYSTEM_DIR.'/config/config.php';
167 167
                 self::$_configs['system'] = $data;
168 168
                 Inji::$inst->event('Config-change-system', $data);
169 169
                 break;
170 170
             case 'app':
171
-                $path = $app->path . "/config/config.php";
171
+                $path = $app->path."/config/config.php";
172 172
                 self::$_configs['app'][$app->name] = $data;
173
-                Inji::$inst->event('Config-change-app-' . $app->name, $data);
173
+                Inji::$inst->event('Config-change-app-'.$app->name, $data);
174 174
                 break;
175 175
             case 'module':
176
-                $path = $app->path . "/config/modules/{$module}.php";
176
+                $path = $app->path."/config/modules/{$module}.php";
177 177
                 self::$_configs['module'][$app->name][$module] = $data;
178
-                Inji::$inst->event('Config-change-module-' . $app->name . '-' . $module, $data);
178
+                Inji::$inst->event('Config-change-module-'.$app->name.'-'.$module, $data);
179 179
                 break;
180 180
             case 'share':
181 181
                 if ($module) {
182
-                    $path = INJI_PROGRAM_DIR . "/config/modules/{$module}.php";
182
+                    $path = INJI_PROGRAM_DIR."/config/modules/{$module}.php";
183 183
                     self::$_configs['shareModules'][$module] = $data;
184
-                    Inji::$inst->event('Config-change-shareModules-' . $module, $data);
184
+                    Inji::$inst->event('Config-change-shareModules-'.$module, $data);
185 185
                 } else {
186
-                    $path = INJI_PROGRAM_DIR . "/config/config.php";
186
+                    $path = INJI_PROGRAM_DIR."/config/config.php";
187 187
                     self::$_configs['share'] = $data;
188 188
                     Inji::$inst->event('Config-change-share', $data);
189 189
                 }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 self::$_configs['custom'][$path] = $data;
194 194
                 break;
195 195
         }
196
-        $text = "<?php\nreturn " . CodeGenerator::genArray($data);
196
+        $text = "<?php\nreturn ".CodeGenerator::genArray($data);
197 197
         Tools::createDir(substr($path, 0, strripos($path, '/')));
198 198
         file_put_contents($path, $text);
199 199
     }
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Orders.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@
 block discarded – undo
15 15
 {
16 16
     public $xml = null;
17 17
 
18
+    /**
19
+     * @param \SimpleXMLElement $xml
20
+     */
18 21
     public function __construct($xml)
19 22
     {
20 23
         $this->xml = $xml;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 $cart->warehouse_block = 0;
71 71
                 foreach ($cart->cartItems as $cci) {
72 72
                     if ($cci->price && $cci->price->offer) {
73
-                        $cci->price->offer->changeWarehouse('-' . (float) $cci->count);
73
+                        $cci->price->offer->changeWarehouse('-'.(float) $cci->count);
74 74
                     }
75 75
                 }
76 76
             }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         foreach ($cart->cartItems as $cartItem) {
134 134
             $isset = false;
135 135
             foreach ($cItems as $key => $cItem) {
136
-                if (!($cItem['item_id'] == $cartItem->item_id )) {
136
+                if (!($cItem['item_id'] == $cartItem->item_id)) {
137 137
                     continue;
138 138
                 }
139 139
                 $isset = true;
Please login to merge, or discard this patch.
system/modules/Chats/install_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.
system/modules/Dashboard/install_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.