Passed
Push — master ( dc7f93...073341 )
by Alexey
06:19 queued 01:24
created
system/modules/Ecommerce/appControllers/content/view.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,11 +18,13 @@
 block discarded – undo
18 18
                         <ul class="item-options">
19 19
                           <?php
20 20
                             foreach ($item->options as $param) {
21
-                                if (!$param->item_option_view || !$param->value)
22
-                                    continue;
21
+                                if (!$param->item_option_view || !$param->value) {
22
+                                                                    continue;
23
+                                }
23 24
                                 if ($param->item_option_type == 'select') {
24
-                                    if (empty($param->option->items[$param->value]))
25
-                                        continue;
25
+                                    if (empty($param->option->items[$param->value])) {
26
+                                                                            continue;
27
+                                    }
26 28
                                     $value = $param->option->items[$param->value]->value;
27 29
                                 } else {
28 30
                                     $value = $param->value;
Please login to merge, or discard this patch.
system/modules/Money/install_script.php 1 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
     $options = ['max_height' => 1200, 'max_width' => 1200];
5 5
     $types = [
6 6
         [
Please login to merge, or discard this patch.
system/modules/Money/objects/MerchantHelper/WalletOne.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,8 +88,9 @@
 block discarded – undo
88 88
         $config = static::getConfig();
89 89
         $merchantCurrency = static::getMerchantCurrency($currency);
90 90
 
91
-        if (!$description)
92
-            $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME);
91
+        if (!$description) {
92
+                    $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME);
93
+        }
93 94
 
94 95
         //Секретный ключ интернет-магазина
95 96
         $key = $config['secret'];
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Pages/pages.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
     for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) {
8 8
         if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) {
9 9
             echo '<li ';
10
-            if ($pagesInstance->params['page'] == $i)
11
-                echo 'class = "active"';
10
+            if ($pagesInstance->params['page'] == $i) {
11
+                            echo 'class = "active"';
12
+            }
12 13
             echo ">";
13 14
             $getArr['page'] = $i;
14 15
             echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>";
15
-        }
16
-        elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
16
+        } elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) {
17 17
             $getArr['page'] = round($pagesInstance->params['page'] / 2);
18 18
             echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>";
19 19
         } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) {
Please login to merge, or discard this patch.
system/modules/Users/install_script.php 1 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
     $options = ['max_height' => 1200, 'max_width' => 1200];
5 5
     $types = [
6 6
         [
Please login to merge, or discard this patch.
system/Inji/ComposerCmd.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@  discard block
 block discarded – undo
22 22
         }
23 23
     }
24 24
 
25
+    /**
26
+     * @param string $path
27
+     */
25 28
     public static function installComposer($path) {
26 29
         if (file_exists($path . '/composer/bin/composer')) {
27 30
             return true;
@@ -74,6 +77,10 @@  discard block
 block discarded – undo
74 77
         self::command('install', false, $path);
75 78
     }
76 79
 
80
+    /**
81
+     * @param string $command
82
+     * @param string $path
83
+     */
77 84
     public static function command($command, $needOutput = true, $path = null) {
78 85
         ini_set('memory_limit', '2000M');
79 86
         include_once getenv('COMPOSER_HOME') . '/composer/vendor/autoload.php';
Please login to merge, or discard this patch.
system/modules/Db/objects/Mysql/Mysql.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     }
109 109
 
110 110
     public function deleteTable($tableName) {
111
-        if(!$tableName){
111
+        if (!$tableName) {
112 112
             return true;
113 113
         }
114 114
         $query = new Mysql\Query($this);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     }
109 109
 
110 110
     public function deleteTable($tableName) {
111
-        if(!$tableName){
111
+        if(!$tableName) {
112 112
             return true;
113 113
         }
114 114
         $query = new Mysql\Query($this);
Please login to merge, or discard this patch.
system/modules/Dashboard/appAdminControllers/content/index.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
     <h4 class ='dashboard-widgets-welcome'>Добро Пожаловать в панель управления<?= class_exists('\Users\User') ? ', ' . \Users\User::$cur->name() : ''; ?></h4>
3 3
     <div class = "row">
4 4
       <?php
5
-      $rowSum = 0;
6
-      foreach ($sections as $section) {
7
-          if (empty($section['widget'])) {
8
-              continue;
9
-          }
10
-          if (isset($section['accessCheck']) && !$section['accessCheck']()) {
11
-              continue;
12
-          }
5
+        $rowSum = 0;
6
+        foreach ($sections as $section) {
7
+            if (empty($section['widget'])) {
8
+                continue;
9
+            }
10
+            if (isset($section['accessCheck']) && !$section['accessCheck']()) {
11
+                continue;
12
+            }
13 13
 
14
-          $widgetSize = !empty($section['size']) ? $section['size'] : 1;
15
-          $rowSum += $widgetSize;
16
-          ?>
14
+            $widgetSize = !empty($section['size']) ? $section['size'] : 1;
15
+            $rowSum += $widgetSize;
16
+            ?>
17 17
             <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $section['widget'](); ?></div>
18 18
             <?php
19 19
             if ($rowSum >= 3) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/filters.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <div class="filters">
2 2
     <form>
3 3
       <?php
4
-      $min = App::$cur->ecommerce->getItems(['sort' => ['price' => 'asc'], 'count' => 1, 'key' => false]);
5
-      $max = App::$cur->ecommerce->getItems(['sort' => ['price' => 'desc'], 'count' => 1, 'key' => false]);
6
-      if ($min && $min[0]->getPrice() && $max && $max[0]->getPrice()) {
7
-          ?>
4
+        $min = App::$cur->ecommerce->getItems(['sort' => ['price' => 'asc'], 'count' => 1, 'key' => false]);
5
+        $max = App::$cur->ecommerce->getItems(['sort' => ['price' => 'desc'], 'count' => 1, 'key' => false]);
6
+        if ($min && $min[0]->getPrice() && $max && $max[0]->getPrice()) {
7
+            ?>
8 8
             <label>Фильтр по цене</label>
9 9
             <div class="form-group">      
10 10
                 <div class="row">
@@ -18,24 +18,24 @@  discard block
 block discarded – undo
18 18
             ?>
19 19
             <div class="filter">  
20 20
               <?php
21
-              switch ($option->type) {
22
-                  case 'radio':
21
+                switch ($option->type) {
22
+                    case 'radio':
23 23
                       echo "<label>{$option->name}</label>";
24
-                      foreach ($option->items(['order' => ['value', 'asc']]) as $item) {
25
-                          $this->widget('Ui\Form/' . $option->type, [
26
-                              'label' => $item->name,
27
-                              'name' => "filters[options][{$option->id}]",
28
-                              !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false,
29
-                              'options' => [
30
-                                  'value' => $item->id,
31
-                              ]
32
-                          ]);
33
-                      }
34
-                      break;
35
-                  case 'select':
24
+                        foreach ($option->items(['order' => ['value', 'asc']]) as $item) {
25
+                            $this->widget('Ui\Form/' . $option->type, [
26
+                                'label' => $item->name,
27
+                                'name' => "filters[options][{$option->id}]",
28
+                                !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false,
29
+                                'options' => [
30
+                                    'value' => $item->id,
31
+                                ]
32
+                            ]);
33
+                        }
34
+                        break;
35
+                    case 'select':
36 36
                       echo "<label>{$option->name}</label>";
37
-                      foreach ($option->items(['order' => ['value', 'asc']]) as $item) {
38
-                          ?>
37
+                        foreach ($option->items(['order' => ['value', 'asc']]) as $item) {
38
+                            ?>
39 39
                             <div class="radio">
40 40
                                 <label>
41 41
                                     <input type="checkbox" name = 'filters[options][<?= $option->id; ?>][]' value ="<?= $item->id; ?>" <?= !empty($_GET['filters']['options'][$option->id]) && in_array($item->id, $_GET['filters']['options'][$option->id]) ? 'checked' : ''; ?>>
Please login to merge, or discard this patch.