Completed
Branch master (ebb499)
by Alexey
04:15
created
system/modules/Money/appControllers/content/pay.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
                     </td>
24 24
                     <td>
25 25
                       <?php
26
-                      foreach ($allowCurrencies as $allowCurrency) {
27
-                          $className = 'Money\MerchantHelper\\' . $merchant->object_name;
28
-                          $sum = $className::getFinalSum($pay, $allowCurrency);
29
-                          ?>
26
+                        foreach ($allowCurrencies as $allowCurrency) {
27
+                            $className = 'Money\MerchantHelper\\' . $merchant->object_name;
28
+                            $sum = $className::getFinalSum($pay, $allowCurrency);
29
+                            ?>
30 30
                             <b><?= $allowCurrency['currency']->name(); ?></b>
31 31
                             <a class="btn btn-primary" href ="/money/merchants/go/<?= $pay->id; ?>/<?= $merchant->id; ?>/<?= $allowCurrency['currency']->id; ?>">Оплатить <?= $sum; ?> <?= $allowCurrency['currency']->acronym(); ?></a>
32 32
                             <?php
Please login to merge, or discard this patch.
system/modules/UserForms/widgets/userForm.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!empty($params[0])) {
2
+if (!empty($params[0])) {
3 3
     $form_id = $params[0];
4 4
 }
5
-if (empty($form_id)) {
5
+if (empty($form_id)) {
6 6
     echo('form not found');
7 7
     return;
8 8
 }
9 9
 $userForm = \UserForms\Form::get((int) $form_id);
10
-if (!$userForm) {
10
+if (!$userForm) {
11 11
     echo('form not found');
12 12
     return;
13 13
 }
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 $form->begin();
16 16
 ?>
17 17
 <?php
18
-if ($userForm->description) {
18
+if ($userForm->description) {
19 19
     echo "<p class = 'text-center'>{$userForm->description}</p>";
20 20
 }
21
-foreach ($userForm->inputs(['order' => ['weight']]) as $input) {
21
+foreach ($userForm->inputs(['order' => ['weight']]) as $input) {
22 22
     $form->input($input->type, 'UserForms[' . (int) $form_id . '][input' . $input->id . ']', $input->label, ['required' => $input->required]);
23 23
 }
24 24
 ?>
Please login to merge, or discard this patch.
system/modules/Notifications/install_script.php 2 patches
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.
Upper-Lower-Casing   +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
     App::$cur->db->createTable('notifications_notification', [
5 5
         'notification_id' => 'pk',
6 6
         'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL',
Please login to merge, or discard this patch.
system/Inji/Statics.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public static function file($path, $resize = '', $resizeCrop = '', $resizePos = '') {
23 23
         $absolutePath = App::$cur->staticLoader->parsePath($path);
24
-        $convet = FALSE;
24
+        $convet = false;
25 25
         if (!file_exists($absolutePath) && file_exists(mb_convert_encoding($absolutePath, 'Windows-1251', 'UTF-8'))) {
26 26
             $absolutePath = mb_convert_encoding($absolutePath, 'Windows-1251', 'UTF-8');
27 27
             $convet = true;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@
 block discarded – undo
24 24
         $code .= '$' . $this->name . ' = ';
25 25
         if (is_array($this->value)) {
26 26
             $code .= \CodeGenerator::genArray($this->value);
27
-        } else {
27
+        }
28
+        else {
28 29
             $code .= '"' . str_replace('"', '\"', $this->value) . '";';
29 30
         }
30 31
         return $code;
Please login to merge, or discard this patch.
system/Inji/App.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,8 @@
 block discarded – undo
105 105
         $moduleClassName = $this->findModuleClass($className);
106 106
         if (!is_bool($moduleClassName) && $moduleClassName != $className) {
107 107
             return $this->_objects[$moduleClassName][$paramsStr] = $this->_objects[$className][$paramsStr] = $this->getObject($moduleClassName);
108
-        } elseif (Module::installed($className, $this) && class_exists($className)) {
108
+        }
109
+        elseif (Module::installed($className, $this) && class_exists($className)) {
109 110
             $this->_objects[$className][$paramsStr] = new $className($this);
110 111
         }
111 112
         if (isset($this->_objects[$className][$paramsStr])) {
Please login to merge, or discard this patch.
system/Inji/Value.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@  discard block
 block discarded – undo
49 49
                     case 'method':
50 50
                         if (!empty($colInfo['colParams']['params'])) {
51 51
                             $values = call_user_func_array([App::$cur->$colInfo['colParams']['module'], $colInfo['colParams']['method']], $colInfo['colParams']['params']);
52
-                        } else {
52
+                        }
53
+                        else {
53 54
                             $values = $colInfo['colParams']['module']->$colInfo['colParams']['method']();
54 55
                         }
55 56
                         return !empty($values[$this->model->{$this->valueKey}]) ? $values[$this->model->{$this->valueKey}] : 'Не задано';
@@ -63,7 +64,8 @@  discard block
 block discarded – undo
63 64
                 $file = Files\File::get($this->model->{$this->valueKey});
64 65
                 if ($file) {
65 66
                     return '<img src="' . $file->path . '?resize=60x120" />';
66
-                } else {
67
+                }
68
+                else {
67 69
                     return '<img src="/static/system/images/no-image.png?resize=60x120" />';
68 70
                 }
69 71
             case 'bool':
Please login to merge, or discard this patch.
system/Inji/Config.php 1 patch
Braces   +13 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
             return self::$_configs['custom'][$path];
46 46
         }
47 47
 
48
-        if (!file_exists($path))
49
-            return [];
48
+        if (!file_exists($path)) {
49
+                    return [];
50
+        }
50 51
 
51 52
         return self::$_configs['custom'][$path] = include $path;
52 53
     }
@@ -85,7 +86,8 @@  discard block
 block discarded – undo
85 86
                 return self::$_configs['shareModules'][$module];
86 87
             }
87 88
             $path = INJI_PROGRAM_DIR . "/config/modules/{$module}.php";
88
-        } else {
89
+        }
90
+        else {
89 91
             if (isset(self::$_configs['share'])) {
90 92
                 return self::$_configs['share'];
91 93
             }
@@ -94,14 +96,16 @@  discard block
 block discarded – undo
94 96
         if (!file_exists($path)) {
95 97
             if (file_exists(INJI_SYSTEM_DIR . "/modules/{$module}/defaultConfig.php")) {
96 98
                 $path = INJI_SYSTEM_DIR . "/modules/{$module}/defaultConfig.php";
97
-            } else {
99
+            }
100
+            else {
98 101
                 return [];
99 102
             }
100 103
         }
101 104
 
102 105
         if ($module) {
103 106
             return self::$_configs['shareModules'][$module] = include $path;
104
-        } else {
107
+        }
108
+        else {
105 109
             return self::$_configs['share'] = include $path;
106 110
         }
107 111
     }
@@ -122,7 +126,8 @@  discard block
 block discarded – undo
122 126
         if ($system) {
123 127
             $appName = 'system';
124 128
             $appPath = INJI_SYSTEM_DIR;
125
-        } else {
129
+        }
130
+        else {
126 131
             $appName = $app->name;
127 132
             $appPath = $app->path;
128 133
         }
@@ -176,7 +181,8 @@  discard block
 block discarded – undo
176 181
                     $path = INJI_PROGRAM_DIR . "/config/modules/{$module}.php";
177 182
                     self::$_configs['shareModules'][$module] = $data;
178 183
                     Inji::$inst->event('Config-change-shareModules-' . $module, $data);
179
-                } else {
184
+                }
185
+                else {
180 186
                     $path = INJI_PROGRAM_DIR . "/config/config.php";
181 187
                     self::$_configs['share'] = $data;
182 188
                     Inji::$inst->event('Config-change-share', $data);
Please login to merge, or discard this patch.
system/Inji/Controller.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,8 @@
 block discarded – undo
66 66
         if (!empty($this->params[0]) && method_exists($this, $this->params[0] . 'Action')) {
67 67
             $this->method = $this->params[0];
68 68
             $this->params = array_slice($this->params, 1);
69
-        } elseif (!method_exists($this, $this->method . 'Action')) {
69
+        }
70
+        elseif (!method_exists($this, $this->method . 'Action')) {
70 71
             INJI_SYSTEM_ERROR('method not found', true);
71 72
         }
72 73
         if (!$this->checkAccess()) {
Please login to merge, or discard this patch.
system/Inji/Router.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@  discard block
 block discarded – undo
27 27
                 }
28 28
             }
29 29
             return $result;
30
-        } else {
30
+        }
31
+        else {
31 32
             return Router::loadClass($className);
32 33
         }
33 34
     }
@@ -99,7 +100,8 @@  discard block
 block discarded – undo
99 100
             $paths[$code . '_ObjectDir'] = $folder . '/objects/' . $classPath . '/' . $classPath . '.php';
100 101
             $paths[$code . '_Model'] = $folder . '/models/' . $classPath . '.php';
101 102
             $paths[$code . '_ModelDir'] = $folder . '/models/' . $classPath . '/' . $classPath . '.php';
102
-        } else {
103
+        }
104
+        else {
103 105
             $classFile = substr($classPath, strrpos($classPath, '/') + 1);
104 106
             $classPathWithotClass = substr($classPath, 0, strrpos($classPath, '/'));
105 107
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
                 return true;
82 82
             }
83 83
         }
84
-        return FALSE;
84
+        return false;
85 85
     }
86 86
 
87 87
     /**
Please login to merge, or discard this patch.