Completed
Push — master ( c662bd...51e7b9 )
by Alexey
05:04
created
system/modules/Ecommerce/widgets/filters.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         <div class="filter">    
8 8
           <h4><?= $option->name; ?></h4>
9 9
           <?php
10
-          foreach ($option->items as $item) {
11
-              ?>
10
+            foreach ($option->items as $item) {
11
+                ?>
12 12
 
13 13
               <div class="radio">
14 14
                 <label>
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
               </div>
19 19
 
20 20
               <?php
21
-          }
22
-          ?>
21
+            }
22
+            ?>
23 23
         </div>
24 24
         <?php
25 25
     }
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Orders.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 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.
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.
system/modules/Files/Files.php 1 patch
Braces   +24 added lines, -16 removed lines patch added patch discarded remove patch
@@ -22,16 +22,19 @@  discard block
 block discarded – undo
22 22
 
23 23
         $sitePath = App::$primary->path;
24 24
 
25
-        if (!is_uploaded_file($file['tmp_name']))
26
-            return 0;
25
+        if (!is_uploaded_file($file['tmp_name'])) {
26
+                    return 0;
27
+        }
27 28
 
28 29
         $fileinfo = pathinfo($file['name']);
29
-        if (empty($fileinfo['extension']))
30
-            return 0;
30
+        if (empty($fileinfo['extension'])) {
31
+                    return 0;
32
+        }
31 33
 
32 34
         $type = Files\Type::get($fileinfo['extension'], 'ext');
33
-        if (!$type)
34
-            return 0;
35
+        if (!$type) {
36
+                    return 0;
37
+        }
35 38
 
36 39
         if (!empty($options['accept_group']) && $options['accept_group'] != $type->group) {
37 40
             return 0;
@@ -47,13 +50,15 @@  discard block
 block discarded – undo
47 50
         }
48 51
         $fileObject->name = $fileinfo['filename'];
49 52
         $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension'];
50
-        if ($fileObject->id && file_exists($sitePath . $fileObject->path))
51
-            unlink($sitePath . $fileObject->path);
53
+        if ($fileObject->id && file_exists($sitePath . $fileObject->path)) {
54
+                    unlink($sitePath . $fileObject->path);
55
+        }
52 56
 
53 57
         Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/');
54 58
 
55
-        if (!move_uploaded_file($file['tmp_name'], $sitePath . $fileObject->path))
56
-            return false;
59
+        if (!move_uploaded_file($file['tmp_name'], $sitePath . $fileObject->path)) {
60
+                    return false;
61
+        }
57 62
 
58 63
         $fileObject->type_id = $type->pk();
59 64
         $fileObject->original_name = $file['name'];
@@ -76,12 +81,14 @@  discard block
 block discarded – undo
76 81
         $sitePath = App::$primary->path;
77 82
 
78 83
         $fileinfo = pathinfo($url);
79
-        if (empty($fileinfo['extension']))
80
-            return 0;
84
+        if (empty($fileinfo['extension'])) {
85
+                    return 0;
86
+        }
81 87
 
82 88
         $type = Files\Type::get($fileinfo['extension'], 'ext');
83
-        if (!$type)
84
-            return 0;
89
+        if (!$type) {
90
+                    return 0;
91
+        }
85 92
 
86 93
         if (!empty($options['accept_group']) && $options['accept_group'] != $type->group) {
87 94
             return 0;
@@ -97,8 +104,9 @@  discard block
 block discarded – undo
97 104
         }
98 105
         $fileObject->name = $fileinfo['filename'];
99 106
         $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension'];
100
-        if ($fileObject->id && file_exists($sitePath . $fileObject->path))
101
-            unlink($sitePath . $fileObject->path);
107
+        if ($fileObject->id && file_exists($sitePath . $fileObject->path)) {
108
+                    unlink($sitePath . $fileObject->path);
109
+        }
102 110
 
103 111
         Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/');
104 112
 
Please login to merge, or discard this patch.
system/modules/Libs/Controllers/LibsController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         $args = func_get_args();
16 16
         $path = $this->module->getPath($args);
17 17
         if($path){
18
-             $this->StaticLoader->giveFile($path);
18
+                $this->StaticLoader->giveFile($path);
19 19
         }
20 20
     }
21 21
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         $args = func_get_args();
16 16
         $path = $this->module->getPath($args);
17
-        if($path){
17
+        if ($path) {
18 18
              $this->StaticLoader->giveFile($path);
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
system/modules/Libs/Libs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                     $this->loadLib($rLib);
26 26
                 }
27 27
             }
28
-            if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'] )) {
28
+            if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'])) {
29 29
                 foreach ($className::$files['css'] as $file) {
30 30
                     if (strpos($file, '/') === 0 || strpos($file, 'http') === 0) {
31 31
                         App::$cur->view->customAsset('css', $file, $libName);
Please login to merge, or discard this patch.
system/modules/Materials/Materials.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Materials module
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
+     * Materials module
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
 class Materials extends Module
11 11
 {
12 12
     function viewsList()
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/content/category.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
   <div class="row">
3 3
     <div class="col-md-3">
4 4
       <?php
5
-      \Ui\Tree::ul($category->getRoot(), 0, function($category) {
6
-          echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
7
-      });
8
-      ?>
5
+        \Ui\Tree::ul($category->getRoot(), 0, function($category) {
6
+            echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
7
+        });
8
+        ?>
9 9
     </div>
10 10
     <div class="col-md-9">
11 11
       <h2 class ='category-name'><?= $category->name; ?></h2>
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
       <div class ="category-materials">
16 16
         <div class ="row">
17 17
           <?php
18
-          $i = 0;
19
-          foreach ($materials as $material) {
20
-              ?>
18
+            $i = 0;
19
+            foreach ($materials as $material) {
20
+                ?>
21 21
               <div class = "col-sm-6 category-material">
22 22
                 <a class="category-material-name" href ="<?= $material->getHref(); ?>"><h3><?= $material->name; ?></h3></a>
23 23
                 <div class="category-material-preview"><?= $material->preview; ?></div>
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
                 </div>
27 27
               </div>
28 28
               <?php
29
-              if (!( ++$i % 2)) {
30
-                  echo '</div><hr /><div class ="row">';
31
-              }
32
-          }
33
-          ?>
29
+                if (!( ++$i % 2)) {
30
+                    echo '</div><hr /><div class ="row">';
31
+                }
32
+            }
33
+            ?>
34 34
         </div>
35 35
         <?php
36 36
         $pages->draw();
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/content/default.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@
 block discarded – undo
4 4
     <?= Ui\FastEdit::block($material, 'text', null, true); ?>
5 5
   </div>
6 6
   <?php
7
-  if ($material->links) {
8
-      echo '<ul class = "material-links">';
9
-      foreach ($material->links as $materialLink) {
10
-          $href = $materialLink->linkedMaterial->alias;
11
-          if ($href == '') {
12
-              $href = '/';
13
-          }
14
-          $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name;
15
-          echo "<li><a href = '{$href}'>{$name}</a></li>";
16
-      }
17
-      echo '</ul>';
18
-  }
19
-  ?>
7
+    if ($material->links) {
8
+        echo '<ul class = "material-links">';
9
+        foreach ($material->links as $materialLink) {
10
+            $href = $materialLink->linkedMaterial->alias;
11
+            if ($href == '') {
12
+                $href = '/';
13
+            }
14
+            $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name;
15
+            echo "<li><a href = '{$href}'>{$name}</a></li>";
16
+        }
17
+        echo '</ul>';
18
+    }
19
+    ?>
20 20
 </div>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/content/materialWithCategorys.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
2 2
   <div class="row">
3 3
     <div class="col-md-3">
4 4
       <?php
5
-      $category = $material->category;
6
-      \Ui\Tree::ul($category->getRoot(), 0, function($category) {
7
-          echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
8
-      });
9
-      ?>
5
+        $category = $material->category;
6
+        \Ui\Tree::ul($category->getRoot(), 0, function($category) {
7
+            echo "<a href='{$category->getHref()}'> {$category->name()}</a>";
8
+        });
9
+        ?>
10 10
     </div>
11 11
     <div class="col-md-9">
12 12
       <h2 class="material-name"><?= $material->name; ?></h2>
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
         <?= Ui\FastEdit::block($material, 'text', null, true); ?>
15 15
       </div>
16 16
       <?php
17
-      if ($material->links) {
18
-          echo '<ul class = "material-links">';
19
-          foreach ($material->links as $materialLink) {
20
-              $href = $materialLink->linkedMaterial->alias;
21
-              if ($href == '') {
22
-                  $href = '/';
23
-              }
24
-              $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name;
25
-              echo "<li><a href = '{$href}'>{$name}</a></li>";
26
-          }
27
-          echo '</ul>';
28
-      }
29
-      ?>
17
+        if ($material->links) {
18
+            echo '<ul class = "material-links">';
19
+            foreach ($material->links as $materialLink) {
20
+                $href = $materialLink->linkedMaterial->alias;
21
+                if ($href == '') {
22
+                    $href = '/';
23
+                }
24
+                $name = $materialLink->name ? $materialLink->name : $materialLink->linkedMaterial->name;
25
+                echo "<li><a href = '{$href}'>{$name}</a></li>";
26
+            }
27
+            echo '</ul>';
28
+        }
29
+        ?>
30 30
     </div>
31 31
   </div>
32 32
 </div>
33 33
\ No newline at end of file
Please login to merge, or discard this patch.