Completed
Push — master ( f0fcd7...6ac12a )
by Alexey
05:33
created
system/modules/Ui/objects/Tree.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Tree
4
- *
5
- * @author Alexey Krupskiy <[email protected]>
6
- * @link http://inji.ru/
7
- * @copyright 2015 Alexey Krupskiy
8
- * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
9
- */
3
+     * Tree
4
+     *
5
+     * @author Alexey Krupskiy <[email protected]>
6
+     * @link http://inji.ru/
7
+     * @copyright 2015 Alexey Krupskiy
8
+     * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
9
+     */
10 10
 
11 11
 namespace Ui;
12 12
 
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
         ?>
24 24
         <ul class="treeview" data-col='tree_path'>
25 25
           <?php
26
-          if (is_string($objectRoot)) {
27
-              $items = $objectRoot::getList(['where' => ['parent_id', 0]]);
28
-          } else {
29
-              $class = get_class($objectRoot);
30
-              $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]);
31
-          }
32
-          $count += count($items);
33
-          foreach ($items as $objectChild) {
34
-              $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc);
35
-          }
36
-          ?>
26
+            if (is_string($objectRoot)) {
27
+                $items = $objectRoot::getList(['where' => ['parent_id', 0]]);
28
+            } else {
29
+                $class = get_class($objectRoot);
30
+                $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]);
31
+            }
32
+            $count += count($items);
33
+            foreach ($items as $objectChild) {
34
+                $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc);
35
+            }
36
+            ?>
37 37
         </ul>
38 38
         <?php
39 39
         return $count;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
           }
32 32
           $count += count($items);
33 33
           foreach ($items as $objectChild) {
34
-              $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc);
34
+              $count += static::showLi($objectChild, 1, $maxDeep, $hrefFunc);
35 35
           }
36 36
           ?>
37 37
         </ul>
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                     echo \Html::el('li', $attributes, $item, true);
64 64
                     echo '<ul>';
65 65
                 }
66
-                $count+=static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc);
66
+                $count += static::showLi($objectChild, $deep + 1, $maxDeep, $hrefFunc);
67 67
             }
68 68
         }
69 69
         if ($isset) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/filters.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -17,30 +17,30 @@  discard block
 block discarded – undo
17 17
         ?>
18 18
         <div class="filter">    
19 19
           <?php
20
-          switch ($option->type) {
21
-              case 'radio':
20
+            switch ($option->type) {
21
+                case 'radio':
22 22
                   foreach ($option->items as $item) {
23
-                      $this->widget('Ui\Form/' . $option->type, [
24
-                          'label' => $item->name,
25
-                          'name' => "filters[options][{$option->id}]",
26
-                          !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false,
27
-                          'options' => [
28
-                              'value' => $item->id,
29
-                          ]
30
-                      ]);
31
-                  }
32
-                  break;
33
-              default:
23
+                        $this->widget('Ui\Form/' . $option->type, [
24
+                            'label' => $item->name,
25
+                            'name' => "filters[options][{$option->id}]",
26
+                            !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false,
27
+                            'options' => [
28
+                                'value' => $item->id,
29
+                            ]
30
+                        ]);
31
+                    }
32
+                    break;
33
+                default:
34 34
                   $this->widget('Ui\Form/' . $option->type, [
35
-                      'label' => $option->name,
36
-                      'name' => "filters[options][{$option->id}]",
37
-                      'options' => [
38
-                          'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '',
39
-                      ]
40
-                  ]);
41
-          }
42
-          foreach ($option->items as $item) {
43
-              ?>
35
+                        'label' => $option->name,
36
+                        'name' => "filters[options][{$option->id}]",
37
+                        'options' => [
38
+                            'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '',
39
+                        ]
40
+                    ]);
41
+            }
42
+            foreach ($option->items as $item) {
43
+                ?>
44 44
               <div class="radio">
45 45
                 <label>
46 46
                   <input type="radio" name = 'filters[options][<?= $option->id; ?>]' value ="<?= $item->id; ?>" <?= !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : ''; ?>>
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
                 </label>
49 49
               </div>
50 50
               <?php
51
-          }
52
-          ?>
51
+            }
52
+            ?>
53 53
         </div>
54 54
         <?php
55 55
     }
Please login to merge, or discard this patch.
system/modules/YandexExport/appControllers/YandexExportController.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -11,6 +11,11 @@
 block discarded – undo
11 11
 {
12 12
     function indexAction()
13 13
     {
14
+
15
+        /**
16
+         * @param DOMDocument $xml
17
+         * @param string $nodeName
18
+         */
14 19
         function addToXml($xml, $parent, $nodeName, $text)
15 20
         {
16 21
             $node = $parent->appendChild($xml->createElement($nodeName));
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/view.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,20 +17,20 @@
 block discarded – undo
17 17
             <h1><?= $item->name(); ?></h1>
18 18
             <ul class="item-options">
19 19
               <?php
20
-              foreach ($item->options as $param) {
21
-                  if (!$param->item_option_view || !$param->value)
22
-                      continue;
23
-                  if ($param->item_option_type == 'select') {
24
-                      if (empty($param->option->items[$param->value]))
25
-                          continue;
26
-                      $value = $param->option->items[$param->value]->value;
27
-                  } else {
28
-                      $value = $param->value;
29
-                  }
30
-                  $paramName = $param->item_option_name;
31
-                  echo "<li>{$paramName}: {$value} {$param->item_option_postfix}</li>";
32
-              }
33
-              ?>
20
+                foreach ($item->options as $param) {
21
+                    if (!$param->item_option_view || !$param->value)
22
+                        continue;
23
+                    if ($param->item_option_type == 'select') {
24
+                        if (empty($param->option->items[$param->value]))
25
+                            continue;
26
+                        $value = $param->option->items[$param->value]->value;
27
+                    } else {
28
+                        $value = $param->value;
29
+                    }
30
+                    $paramName = $param->item_option_name;
31
+                    echo "<li>{$paramName}: {$value} {$param->item_option_postfix}</li>";
32
+                }
33
+                ?>
34 34
             </ul>
35 35
             <div class="item-actions">
36 36
               <div class="item-price">
Please login to merge, or discard this 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/Ecommerce/objects/CloseCartBtn.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Item name
4
- *
5
- * Info
6
- *
7
- * @author Alexey Krupskiy <[email protected]>
8
- * @link http://inji.ru/
9
- * @copyright 2016 Alexey Krupskiy
10
- * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
11
- */
3
+     * Item name
4
+     *
5
+     * Info
6
+     *
7
+     * @author Alexey Krupskiy <[email protected]>
8
+     * @link http://inji.ru/
9
+     * @copyright 2016 Alexey Krupskiy
10
+     * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
11
+     */
12 12
 
13 13
 namespace Money;
14 14
 
Please login to merge, or discard this patch.
system/modules/UserForms/models/Input.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
         'label' => ['type' => 'text'],
25 25
         'type' => ['type' => 'text'],
26 26
         'required' => ['type' => 'bool'],
27
-        'form_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'form'],
28
-        'user_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'user'],
27
+        'form_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'form'],
28
+        'user_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'user'],
29 29
         'input_params' => ['type' => 'textarea'],
30 30
         'weight' => ['type' => 'number']
31 31
     ];
Please login to merge, or discard this patch.
system/modules/UserForms/models/Form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
     public static $cols = [
25 25
         'name' => ['type' => 'text'],
26 26
         'description' => ['type' => 'html'],
27
-        'user_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'user'],
27
+        'user_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'user'],
28 28
         'date_create' => ['type' => 'dateTime'],
29 29
         //Менеджеры
30
-        'inputs' => [ 'type' => 'dataManager', 'relation' => 'inputs'],
30
+        'inputs' => ['type' => 'dataManager', 'relation' => 'inputs'],
31 31
     ];
32 32
     public static $dataManagers = [
33 33
         'manager' => [
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/items/table.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@
 block discarded – undo
2 2
   <div class="table-responsive">
3 3
     <table class="table table-bordered table-condensed table-striped table-hover">
4 4
       <?php
5
-      $i = 0;
6
-      foreach ($items as $item) {
7
-          ?>
5
+        $i = 0;
6
+        foreach ($items as $item) {
7
+            ?>
8 8
           <tr>	
9 9
             <?php $this->widget('Ecommerce\items/item-tablerow', ['item' => $item]); ?>
10 10
           </tr>
11 11
           <?php
12
-          if (!( ++$i % 3)) {
13
-              echo '</div><div class="row">';
14
-          }
15
-      }
16
-      ?>
12
+            if (!( ++$i % 3)) {
13
+                echo '</div><div class="row">';
14
+            }
15
+        }
16
+        ?>
17 17
     </table></div>
18 18
 </div>
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/categorys.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <div class="ecommerce-sidebar-categorys">
2 2
   <?php
3
-  if (empty($category)) {
4
-      $category = [];
5
-  }
6
-  $tree = new Ui\Tree();
7
-  $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) {
8
-      if ($category && $category->id == $categoryItem->id) {
9
-          $class = 'active';
10
-      } else {
11
-          $class = '';
12
-      }
13
-      return [
14
-          'attributes' => [
15
-              'class' => $class,
16
-          ],
17
-          'text' => "<a {$class} href = '/ecommerce/itemList/{$categoryItem->id}'>{$categoryItem->name}</a>"
18
-      ];
19
-  });
20
-  ?>
3
+    if (empty($category)) {
4
+        $category = [];
5
+    }
6
+    $tree = new Ui\Tree();
7
+    $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) {
8
+        if ($category && $category->id == $categoryItem->id) {
9
+            $class = 'active';
10
+        } else {
11
+            $class = '';
12
+        }
13
+        return [
14
+            'attributes' => [
15
+                'class' => $class,
16
+            ],
17
+            'text' => "<a {$class} href = '/ecommerce/itemList/{$categoryItem->id}'>{$categoryItem->name}</a>"
18
+        ];
19
+    });
20
+    ?>
21 21
 </div>
22 22
\ No newline at end of file
Please login to merge, or discard this patch.