Completed
Push — master ( 308a3c...ebb499 )
by Alexey
08:08
created
system/modules/Ui/widgets/Table/head.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@
 block discarded – undo
4 4
       foreach ($table->cols as $col) {
5 5
           if (is_string($col)) {
6 6
               echo "<th>{$col}</th>";
7
-          } else {
7
+          }
8
+          else {
8 9
               echo Html::el('th', !empty($col['attributes']) ? $col['attributes'] : [], $col['text']);
9 10
           }
10 11
       }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Table/foot.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@
 block discarded – undo
4 4
       foreach ($table->cols as $col) {
5 5
           if (is_string($col)) {
6 6
               echo "<th>{$col}</th>";
7
-          } else {
7
+          }
8
+          else {
8 9
               echo Html::el('th', !empty($col['attributes']) ? $col['attributes'] : [], $col['text']);
9 10
           }
10 11
       }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/managerButtons.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@
 block discarded – undo
4 4
 foreach ($buttons as $button) {
5 5
     if (!empty($button['class'])) {
6 6
         $button['class'] = 'btn btn-primary btn-sm ' . $button['class'];
7
-    } else {
7
+    }
8
+    else {
8 9
         $button['class'] = 'btn btn-primary btn-sm';
9 10
     }
10 11
     $html .= Html::el('a', $button, $button['text']);
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/filters.php 1 patch
Braces   +24 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@  discard block
 block discarded – undo
15 15
           if ($dataManager->modelName) {
16 16
               $modelName = $dataManager->modelName;
17 17
               $colInfo = $modelName::getColInfo($col);
18
-          } else {
18
+          }
19
+          else {
19 20
               $colInfo = $dataManager->managerOptions['cols'][$col];
20 21
           }
21 22
           $values = [];
@@ -28,10 +29,12 @@  discard block
 block discarded – undo
28 29
                       $param = substr($colOptions['userCol'], strpos($colOptions['userCol'], ':') + 1);
29 30
 
30 31
                       $inputOptions['value'] = \Users\User::$cur->$rel->$param;
31
-                  } else {
32
+                  }
33
+                  else {
32 34
                       $this->model->$col = \Users\User::$cur->{$preset['userCol']};
33 35
                   }
34
-              } elseif (!empty($colOptions['value'])) {
36
+              }
37
+              elseif (!empty($colOptions['value'])) {
35 38
                   $inputOptions['value'] = $colOptions['value'];
36 39
               }
37 40
               if (is_array($inputOptions['value'])) {
@@ -40,7 +43,8 @@  discard block
 block discarded – undo
40 43
                       $inputOptions['value'] = $value;
41 44
                       $form->input('hidden', "datamanagerFilters[{$col}][value][{$key}]", '', $inputOptions);
42 45
                   }
43
-              } else {
46
+              }
47
+              else {
44 48
                   $form->input('hidden', "datamanagerFilters[{$col}][value]", '', $inputOptions);
45 49
               }
46 50
               continue;
@@ -59,7 +63,8 @@  discard block
 block discarded – undo
59 63
                           case 'method':
60 64
                               if (!empty($colInfo['colParams']['params'])) {
61 65
                                   $values = call_user_func_array([App::$cur->$colInfo['colParams']['module'], $colInfo['colParams']['method']], $colInfo['colParams']['params']);
62
-                              } else {
66
+                              }
67
+                              else {
63 68
                                   $values = ['' => 'Не важно'] + App::$cur->$colInfo['colParams']['module']->$colInfo['colParams']['method']();
64 69
                               }
65 70
                               break;
@@ -81,7 +86,8 @@  discard block
 block discarded – undo
81 86
                               foreach ($items as $key => $item) {
82 87
                                   if (!empty($inputParams['showCol'])) {
83 88
                                       $values[$key] = $item->$inputParams['showCol'];
84
-                                  } else {
89
+                                  }
90
+                                  else {
85 91
                                       $values[$key] = $item->name();
86 92
                                   }
87 93
                               }
@@ -100,10 +106,12 @@  discard block
 block discarded – undo
100 106
                                   $param = substr($colOptions['userCol'], strpos($colOptions['userCol'], ':') + 1);
101 107
 
102 108
                                   $inputOptions['value'] = \Users\User::$cur->$rel->$param;
103
-                              } else {
109
+                              }
110
+                              else {
104 111
                                   $this->model->$col = \Users\User::$cur->{$preset['userCol']};
105 112
                               }
106
-                          } elseif (!empty($colOptions['value'])) {
113
+                          }
114
+                          elseif (!empty($colOptions['value'])) {
107 115
 
108 116
                               $inputOptions['value'] = $colOptions['value'];
109 117
                           }
@@ -141,9 +149,11 @@  discard block
 block discarded – undo
141 149
                           <?php
142 150
                           if (!empty($_GET['datamanagerFilters'][$col]['value'])) {
143 151
                               $value = 1;
144
-                          } elseif (isset($_GET['datamanagerFilters'][$col]['value'])) {
152
+                          }
153
+                          elseif (isset($_GET['datamanagerFilters'][$col]['value'])) {
145 154
                               $value = 0;
146
-                          } else {
155
+                          }
156
+                          else {
147 157
                               $value = '';
148 158
                           }
149 159
                           $inputOptions = ['value' => $value, 'values' => [
@@ -162,10 +172,12 @@  discard block
 block discarded – undo
162 172
                                       $param = substr($colOptions['userCol'], strpos($colOptions['userCol'], ':') + 1);
163 173
 
164 174
                                       $inputOptions['value'] = \Users\User::$cur->$rel->$param;
165
-                                  } else {
175
+                                  }
176
+                                  else {
166 177
                                       $this->model->$col = \Users\User::$cur->{$preset['userCol']};
167 178
                                   }
168
-                              } elseif (!empty($colOptions['value'])) {
179
+                              }
180
+                              elseif (!empty($colOptions['value'])) {
169 181
 
170 182
                                   $inputOptions['value'] = $colOptions['value'];
171 183
                               }
Please login to merge, or discard this patch.
system/modules/Materials/models/Material.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,9 +147,11 @@  discard block
 block discarded – undo
147 147
     public function resolveTemplate() {
148 148
         if ($this->template !== 'inherit') {
149 149
             return $this->template;
150
-        } elseif ($this->template == 'inherit' && $this->category) {
150
+        }
151
+        elseif ($this->template == 'inherit' && $this->category) {
151 152
             return $this->category->resolveTemplate(true);
152
-        } else {
153
+        }
154
+        else {
153 155
             return 'current';
154 156
         }
155 157
     }
@@ -157,9 +159,11 @@  discard block
 block discarded – undo
157 159
     public function resolveViewer() {
158 160
         if ($this->viewer !== 'inherit') {
159 161
             return $this->viewer;
160
-        } elseif ($this->viewer == 'inherit' && $this->category) {
162
+        }
163
+        elseif ($this->viewer == 'inherit' && $this->category) {
161 164
             return $this->category->resolveViewer(true);
162
-        } else {
165
+        }
166
+        else {
163 167
             return 'default';
164 168
         }
165 169
     }
Please login to merge, or discard this patch.
system/modules/Materials/models/Category.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,9 +136,11 @@  discard block
 block discarded – undo
136 136
         $param = $material ? 'material_template' : 'template';
137 137
         if ($this->$param !== 'inherit') {
138 138
             return $this->$param;
139
-        } elseif ($this->$param == 'inherit' && $this->parent) {
139
+        }
140
+        elseif ($this->$param == 'inherit' && $this->parent) {
140 141
             return $this->parent->resolveTemplate($material);
141
-        } else {
142
+        }
143
+        else {
142 144
             return 'current';
143 145
         }
144 146
     }
@@ -147,9 +149,11 @@  discard block
 block discarded – undo
147 149
         $param = $material ? 'material_viewer' : 'viewer';
148 150
         if ($this->$param !== 'inherit') {
149 151
             return $this->$param;
150
-        } elseif ($this->$param == 'inherit' && $this->parent) {
152
+        }
153
+        elseif ($this->$param == 'inherit' && $this->parent) {
151 154
             return $this->parent->resolveViewer($material);
152
-        } else {
155
+        }
156
+        else {
153 157
             return $material ? 'default' : 'category';
154 158
         }
155 159
     }
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/MaterialsController.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@  discard block
 block discarded – undo
33 33
                     ['category_id', $category->id],
34 34
                     ['alias', $args[count($args) - 1]],
35 35
                 ];
36
-            } else {
36
+            }
37
+            else {
37 38
                 $where = [['alias', $path]];
38 39
             }
39 40
             $material = Materials\Material::get($where);
@@ -43,7 +44,8 @@  discard block
 block discarded – undo
43 44
                         ['category_id', $category->id],
44 45
                         ['id', (int) $args[count($args) - 1]],
45 46
                     ];
46
-                } else {
47
+                }
48
+                else {
47 49
                     $where = [['alias', $path]];
48 50
                 }
49 51
                 $material = Materials\Material::get($where);
@@ -54,12 +56,14 @@  discard block
 block discarded – undo
54 56
                     $this->categoryAction($category->id);
55 57
                 }
56 58
             }
57
-        } else {
59
+        }
60
+        else {
58 61
             $material = Materials\Material::get(1, 'default');
59 62
         }
60 63
         if ($material) {
61 64
             $this->viewAction($material->id);
62
-        } elseif (!$category && !$material) {
65
+        }
66
+        elseif (!$category && !$material) {
63 67
             Tools::header('404');
64 68
             $this->view->page([
65 69
                 'content' => '404',
@@ -92,7 +96,8 @@  discard block
 block discarded – undo
92 96
                 'content' => '404',
93 97
                 'data' => ['text' => 'Такой страницы не найдено']
94 98
             ]);
95
-        } else {
99
+        }
100
+        else {
96 101
             $this->view->setTitle($category->name);
97 102
 
98 103
             $pages = new Ui\Pages($_GET, ['count' => Materials\Material::getCount(['where' => ['tree_path', $category->tree_path . $category->id . '/%', 'LIKE']]), 'limit' => 10]);
@@ -135,7 +140,8 @@  discard block
 block discarded – undo
135 140
         }
136 141
         if ($material->image) {
137 142
             $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . idn_to_utf8(INJI_DOMAIN_NAME) . $material->image->path]);
138
-        } elseif ($logo = Files\File::get('site_logo', 'code')) {
143
+        }
144
+        elseif ($logo = Files\File::get('site_logo', 'code')) {
139 145
             $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . idn_to_utf8(INJI_DOMAIN_NAME) . $logo->path]);
140 146
         }
141 147
         $this->view->setTitle($material->name);
Please login to merge, or discard this patch.
system/modules/Recaptcha/Recaptcha.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
     public function show() {
18 18
         if (!$this->config['sitekey']) {
19 19
             echo 'SiteKey not set for reCAPTCHA';
20
-        } else {
20
+        }
21
+        else {
21 22
             echo "<div class='g-recaptcha' data-sitekey='{$this->config['sitekey']}'></div>";
22 23
         }
23 24
     }
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/TemplateController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
             $content = file_get_contents($template->path . '/' . Tools::parsePath($_GET['path']));
32 32
             $this->libs->loadLib('Ace');
33 33
             $this->view->page(['content' => 'Template/edit', 'data' => compact('template', 'content')]);
34
-        } else {
34
+        }
35
+        else {
35 36
             $this->view->page(['content' => 'Template/chooseFile', 'data' => compact('template')]);
36 37
         }
37 38
     }
Please login to merge, or discard this patch.