Passed
Push — master ( 1fbb37...9e3033 )
by Alexey
07:10
created
system/Inji/Msg.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,9 @@
 block discarded – undo
49 49
      * @return array
50 50
      */
51 51
     public static function get($clean = false) {
52
-        if (empty($_SESSION['_INJI_MSG']))
53
-            return [];
52
+        if (empty($_SESSION['_INJI_MSG'])) {
53
+                    return [];
54
+        }
54 55
         $msgs = $_SESSION['_INJI_MSG'];
55 56
         if ($clean) {
56 57
             $_SESSION['_INJI_MSG'] = [];
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     }
38 38
 }
39 39
 
40
-require_once( INJI_SYSTEM_DIR . '/init.php' );
40
+require_once(INJI_SYSTEM_DIR . '/init.php');
41 41
 
42 42
 /**
43 43
  * System error messages
Please login to merge, or discard this patch.
system/modules/Materials/widgets/category/materialList.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 <div class ="category-materials">
13 13
     <div class ="row">
14 14
       <?php
15
-      $i = 0;
16
-      foreach ($materials as $material) {
17
-          ?>
15
+        $i = 0;
16
+        foreach ($materials as $material) {
17
+            ?>
18 18
             <div class = "col-sm-6 category-material">
19 19
                 <a class="category-material-name" href ="<?= $material->getHref(); ?>"><h3><?= $material->name; ?></h3></a>
20 20
                 <div class="category-material-preview"><?= $material->preview; ?></div>
Please login to merge, or discard this patch.
system/Inji/Model.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 if ($file) {
222 222
                     $photoId = Tools::randomString();
223 223
                     $value = '<a href = "' . $file->path . '" id="' . $photoId . '"><img src="' . $file->path . '?resize=60x120" /></a>';
224
-                    $value .='<script>inji.onLoad(function(){$("#' . $photoId . '").fancybox();});</script>';
224
+                    $value .= '<script>inji.onLoad(function(){$("#' . $photoId . '").fancybox();});</script>';
225 225
                 } else {
226 226
                     $value = '<img src="/static/system/images/no-image.png?resize=60x120" />';
227 227
                 }
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
                 $items[$item[$arrayKey]] = new $class($item);
1121 1121
             }
1122 1122
             if (!empty($options['order'])) {
1123
-                usort($items, function($a, $b) use($options) {
1123
+                usort($items, function ($a, $b) use($options) {
1124 1124
                     if ($a->{$options['order'][0]} > $b->{$options['order'][0]} && $options['order'][1] = 'asc') {
1125 1125
                         return 1;
1126 1126
                     } elseif ($a->{$options['order'][0]} < $b->{$options['order'][0]} && $options['order'][1] = 'asc') {
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
         } else {
1304 1304
             $cols .= '*';
1305 1305
         }
1306
-        $cols .=') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : '');
1306
+        $cols .= ') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : '');
1307 1307
         $query->cols = $cols;
1308 1308
         if (!empty($options['group'])) {
1309 1309
             $query->group($options['group']);
@@ -1962,7 +1962,7 @@  discard block
 block discarded – undo
1962 1962
         if (!$value && !empty(static::$cols[$shortName]) && in_array('emptyValue', array_keys(static::$cols[$shortName]))) {
1963 1963
             $value = static::$cols[$shortName]['emptyValue'];
1964 1964
         }
1965
-        if(is_null($value) && empty(static::$cols[$shortName]['null'])){
1965
+        if (is_null($value) && empty(static::$cols[$shortName]['null'])) {
1966 1966
             $value = '';
1967 1967
         }
1968 1968
         if (!empty($className::$cols[$shortName])) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1962,7 +1962,7 @@
 block discarded – undo
1962 1962
         if (!$value && !empty(static::$cols[$shortName]) && in_array('emptyValue', array_keys(static::$cols[$shortName]))) {
1963 1963
             $value = static::$cols[$shortName]['emptyValue'];
1964 1964
         }
1965
-        if(is_null($value) && empty(static::$cols[$shortName]['null'])){
1965
+        if(is_null($value) && empty(static::$cols[$shortName]['null'])) {
1966 1966
             $value = '';
1967 1967
         }
1968 1968
         if (!empty($className::$cols[$shortName])) {
Please login to merge, or discard this patch.
system/modules/Materials/migrations/addPublishDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'up' => function() {
4
+    'up' => function () {
5 5
         Materials\Material::createCol('date_publish');
6 6
         foreach (Materials\Material::getList() as $material) {
7 7
             $material->date_publish = $material->date_create;
Please login to merge, or discard this patch.
system/modules/Materials/appControllers/MaterialsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
                     $this->categoryAction($category->id);
57 57
                 }
58 58
             }
59
-        } elseif(!$material) {
59
+        } elseif (!$material) {
60 60
             $material = Materials\Material::get(1, 'default');
61 61
         }
62 62
         if ($material) {
Please login to merge, or discard this patch.