Test Failed
Push — master ( b74686...9a59de )
by Alexey
05:52
created
system/modules/Ui/objects/DataManager.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -396,6 +396,9 @@
 block discarded – undo
396 396
         return $rows;
397 397
     }
398 398
 
399
+    /**
400
+     * @param DataManager $dataManager
401
+     */
399 402
     public static function drawCol($item, $colName, $params = [], $dataManager = null, $originalCol = '', $originalItem = null) {
400 403
         $modelName = get_class($item);
401 404
         if (!class_exists($modelName)) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         ob_end_clean();
197 197
 
198 198
         $cols = [];
199
-        if($actions) {
199
+        if ($actions) {
200 200
             $cols[] = ['label' => $dropdown];
201 201
         }
202 202
         $cols['id'] = ['label' => '№', 'sortable' => true];
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
         $queryParams = [];
245 245
         if (empty($params['all'])) {
246 246
             if (!empty($params['limit'])) {
247
-                $this->limit = (int)$params['limit'];
247
+                $this->limit = (int) $params['limit'];
248 248
             }
249 249
             if (!empty($params['page'])) {
250
-                $this->page = (int)$params['page'];
250
+                $this->page = (int) $params['page'];
251 251
             }
252 252
             $queryParams['limit'] = $this->limit;
253 253
             $queryParams['start'] = $this->page * $this->limit - $this->limit;
@@ -492,8 +492,8 @@  discard block
 block discarded – undo
492 492
                 } elseif (\App::$cur->name == 'admin' && $colName == 'name') {
493 493
                     $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/' . str_replace('\\', '/', get_class($originalItem));
494 494
                     return "<a href ='/admin/{$item->genViewLink()}?redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
495
-                } elseif ($modelName::$cols[$colName]['type'] == 'html' || $modelName::$cols[$colName]['type']=='textarea') {
496
-                    $uid = 'text_'.\Tools::randomString();
495
+                } elseif ($modelName::$cols[$colName]['type'] == 'html' || $modelName::$cols[$colName]['type'] == 'textarea') {
496
+                    $uid = 'text_' . \Tools::randomString();
497 497
                     $script = "<script>inji.onLoad(function(){
498 498
             var el{$uid}=$('#{$uid}');
499 499
             var height{$uid} = el{$uid}.height();
@@ -557,10 +557,10 @@  discard block
 block discarded – undo
557 557
             return [];
558 558
         }
559 559
         if (!empty($params['limit'])) {
560
-            $this->limit = (int)$params['limit'];
560
+            $this->limit = (int) $params['limit'];
561 561
         }
562 562
         if (!empty($params['page'])) {
563
-            $this->page = (int)$params['page'];
563
+            $this->page = (int) $params['page'];
564 564
         }
565 565
         $queryParams = [
566 566
             'count' => true
Please login to merge, or discard this patch.
system/modules/Ui/objects/Table.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@
 block discarded – undo
23 23
     public $attributes = [];
24 24
     public $indexCol = null;
25 25
 
26
+    /**
27
+     * @param string[] $cols
28
+     */
26 29
     public function setCols($cols) {
27 30
         $this->cols = $cols;
28 31
     }
Please login to merge, or discard this patch.
system/modules/View/View.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -145,6 +145,9 @@  discard block
 block discarded – undo
145 145
         return $result[1];
146 146
     }
147 147
 
148
+    /**
149
+     * @param string $source
150
+     */
148 151
     public function parseSource($source) {
149 152
         $tags = $this->parseRaw($source);
150 153
         foreach ($tags as $rawTag) {
@@ -190,6 +193,9 @@  discard block
 block discarded – undo
190 193
         return substr($source, ($pos + strlen($rawTag) + 2));
191 194
     }
192 195
 
196
+    /**
197
+     * @param string $type
198
+     */
193 199
     public function getHref($type, $params) {
194 200
         $href = '';
195 201
         if (is_string($params)) {
@@ -518,6 +524,9 @@  discard block
 block discarded – undo
518 524
         }
519 525
     }
520 526
 
527
+    /**
528
+     * @param string $type
529
+     */
521 530
     public function customAsset($type, $asset, $lib = false) {
522 531
         if (!$lib) {
523 532
             $this->dynAssets[$type][] = $asset;
@@ -540,6 +549,9 @@  discard block
 block discarded – undo
540 549
         }
541 550
     }
542 551
 
552
+    /**
553
+     * @param string $lineParams
554
+     */
543 555
     public function widget($_widgetName, $_params = [], $lineParams = null) {
544 556
         $_paths = $this->getWidgetPaths($_widgetName);
545 557
         $find = false;
Please login to merge, or discard this patch.
system/objects/CodeGenerator.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -30,6 +30,9 @@
 block discarded – undo
30 30
         return $return;
31 31
     }
32 32
 
33
+    /**
34
+     * @param string $path
35
+     */
33 36
     public static function parseClass($path) {
34 37
         $code = file_get_contents($path);
35 38
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,20 +12,22 @@
 block discarded – undo
12 12
 
13 13
     public static function genArray($data, $level = 0) {
14 14
         $return = '';
15
-        if ($level == 0)
16
-            $return = "[";
15
+        if ($level == 0) {
16
+                    $return = "[";
17
+        }
17 18
         foreach ($data as $key => $item) {
18 19
             $return .= "\n" . str_repeat(' ', ($level * 4 + 4)) . "'{$key}' => ";
19
-            if (!is_array($item))
20
-                $return .= "'{$item}',";
21
-            else {
20
+            if (!is_array($item)) {
21
+                            $return .= "'{$item}',";
22
+            } else {
22 23
                 $return .= "[";
23 24
                 $return .= rtrim(self::genArray($item, $level + 1), ',');
24 25
                 $return .= "\n" . str_repeat(' ', ($level * 4 + 4)) . "],";
25 26
             }
26 27
         }
27
-        if ($level == 0)
28
-            $return = rtrim($return, ',') . "\n];";
28
+        if ($level == 0) {
29
+                    $return = rtrim($return, ',') . "\n];";
30
+        }
29 31
 
30 32
         return $return;
31 33
     }
Please login to merge, or discard this patch.
system/modules/Migrations/install_script.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function ($step = null, $params = []) {
4 4
     
5 5
 };
Please login to merge, or discard this patch.
system/modules/UserForms/install_script.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function ($step = null, $params = []) {
4 4
     
5 5
 };
Please login to merge, or discard this patch.
system/modules/Money/widgets/cabinet/walletsWidget.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 <?php
3 3
 $blocked = App::$cur->money->getUserBlocks();
4 4
 $wallets = App::$cur->money->getUserWallets();
5
-foreach ($wallets as $wallet) {
5
+foreach ($wallets as $wallet) {
6 6
     ?>
7 7
     <b><?= $wallet->showAmount(); ?></b> <?= $wallet->currency->acronym(); ?><br/>
8 8
     <?php
Please login to merge, or discard this patch.
system/modules/Sliders/install_script.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function ($step = null, $params = []) {
4 4
     
5 5
 };
Please login to merge, or discard this patch.
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.