Completed
Branch master (dd64f4)
by Alexey
04:20
created
system/Inji/ComposerCmd.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -58,6 +58,10 @@
 block discarded – undo
58 58
         self::command('install', false, $path);
59 59
     }
60 60
 
61
+    /**
62
+     * @param string $command
63
+     * @param string $path
64
+     */
61 65
     static function command($command, $needOutput = true, $path = null)
62 66
     {
63 67
         include_once 'composer/vendor/autoload.php';
Please login to merge, or discard this patch.
system/Inji/Tools.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -216,6 +216,7 @@
 block discarded – undo
216 216
      * @param  $number Integer Число на основе которого нужно сформировать окончание
217 217
      * @param  $endingsArray  Array Массив слов или окончаний для чисел (1, 4, 5),
218 218
      *         например array('яблоко', 'яблока', 'яблок')
219
+     * @param string[] $endingArray
219 220
      * @return String
220 221
      */
221 222
     static function getNumEnding($number, $endingArray)
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@
 block discarded – undo
55 55
      * @return boolean
56 56
      */
57 57
     public static function createDir($path) {
58
-        if (file_exists($path))
59
-            return true;
58
+        if (file_exists($path)) {
59
+                    return true;
60
+        }
60 61
 
61 62
         $path = explode('/', $path);
62 63
         $cur = '';
Please login to merge, or discard this patch.
system/modules/Db/objects/Mysql/Query.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@  discard block
 block discarded – undo
29 29
     public $params = [];
30 30
     public $distinct = false;
31 31
 
32
+    /**
33
+     * @param  $instance
34
+     */
32 35
     function __construct($instance = null)
33 36
     {
34 37
         if (!$instance) {
@@ -47,6 +50,9 @@  discard block
 block discarded – undo
47 50
         return $this->curInstance->pdo->lastInsertId();
48 51
     }
49 52
 
53
+    /**
54
+     * @param string $table
55
+     */
50 56
     public function select($table)
51 57
     {
52 58
         $this->operation = 'SELECT';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                             $concatenation = '';
185 185
             }
186 186
 
187
-            if ($this->whereString == NULL) {
187
+            if ($this->whereString == null) {
188 188
                             $this->whereString = ' WHERE ';
189 189
             }
190 190
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
                         $this->whereString .= "{$concatenation} ";
233 233
                     }
234 234
 
235
-                    if ($this->whereString != NULL) {
235
+                    if ($this->whereString != null) {
236 236
                                             $this->whereString .= '(';
237 237
                     } else {
238 238
                                             $this->whereString = 'WHERE (';
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                             $concatenation = '';
272 272
             }
273 273
 
274
-            if ($this->havingString == NULL) {
274
+            if ($this->havingString == null) {
275 275
                             $this->havingString = ' HAVING ';
276 276
             }
277 277
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
                         $this->havingString .= "{$concatenation} ";
320 320
                     }
321 321
 
322
-                    if ($this->havingString != NULL) {
322
+                    if ($this->havingString != null) {
323 323
                                             $this->havingString .= '(';
324 324
                     } else {
325 325
                                             $this->havingString = 'HAVING (';
Please login to merge, or discard this patch.
system/modules/Modules/Modules.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -45,6 +45,10 @@
 block discarded – undo
45 45
         return $modelCols;
46 46
     }
47 47
 
48
+    /**
49
+     * @param string $colPrefix
50
+     * @param string $tableName
51
+     */
48 52
     function parseColsForTable($cols, $colPrefix, $tableName)
49 53
     {
50 54
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     function parseColsForModel($cols = [])
27 27
     {
28
-        $modelCols = [ 'labels' => [], 'cols' => [], 'relations' => []];
28
+        $modelCols = ['labels' => [], 'cols' => [], 'relations' => []];
29 29
         foreach ($cols as $col) {
30 30
             $modelCols['labels'][$col['code']] = $col['label'];
31 31
             $colType = !empty($col['type']['primary']) ? $col['type']['primary'] : $col['type'];
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
     function setCols($cols)
27 30
     {
28 31
         $this->cols = $cols;
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
@@ -147,6 +147,9 @@  discard block
 block discarded – undo
147 147
         return $result[1];
148 148
     }
149 149
 
150
+    /**
151
+     * @param string $source
152
+     */
150 153
     function parseSource($source)
151 154
     {
152 155
         $tags = $this->parseRaw($source);
@@ -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
     function getHref($type, $params)
194 200
     {
195 201
         $href = '';
@@ -531,6 +537,9 @@  discard block
 block discarded – undo
531 537
         echo round(( microtime(true) - INJI_TIME_START), 4);
532 538
     }
533 539
 
540
+    /**
541
+     * @param string $type
542
+     */
534 543
     function customAsset($type, $asset, $lib = false)
535 544
     {
536 545
         if (!$lib) {
@@ -549,6 +558,9 @@  discard block
 block discarded – undo
549 558
         }
550 559
     }
551 560
 
561
+    /**
562
+     * @param string $lineParams
563
+     */
552 564
     function widget($_widgetName, $_params = [], $lineParams = null)
553 565
     {
554 566
         $_paths = $this->getWidgetPaths($_widgetName);
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
@@ -31,6 +31,9 @@
 block discarded – undo
31 31
         return $return;
32 32
     }
33 33
 
34
+    /**
35
+     * @param string $path
36
+     */
34 37
     static function parseClass($path)
35 38
     {
36 39
         $code = file_get_contents($path);
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,20 +13,22 @@
 block discarded – undo
13 13
     static function genArray($data, $level = 0)
14 14
     {
15 15
         $return = '';
16
-        if ($level == 0)
17
-            $return = "[";
16
+        if ($level == 0) {
17
+                    $return = "[";
18
+        }
18 19
         foreach ($data as $key => $item) {
19 20
             $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "'{$key}' => ";
20
-            if (!is_array($item))
21
-                $return .= "'{$item}',";
22
-            else {
21
+            if (!is_array($item)) {
22
+                            $return .= "'{$item}',";
23
+            } else {
23 24
                 $return .= "[";
24 25
                 $return .= rtrim(self::genArray($item, $level + 1), ',');
25 26
                 $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "],";
26 27
             }
27 28
         }
28
-        if ($level == 0)
29
-            $return = rtrim($return, ',') . "\n];";
29
+        if ($level == 0) {
30
+                    $return = rtrim($return, ',') . "\n];";
31
+        }
30 32
 
31 33
         return $return;
32 34
     }
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
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     }
36 36
 }
37 37
 
38
-require_once( INJI_SYSTEM_DIR . '/init.php' );
38
+require_once(INJI_SYSTEM_DIR . '/init.php');
39 39
 /**
40 40
  * System error messages
41 41
  */
Please login to merge, or discard this patch.
system/Inji/Model.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1035,7 +1035,7 @@
 block discarded – undo
1035 1035
         } else {
1036 1036
             $cols .= '*';
1037 1037
         }
1038
-        $cols .=') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : '');
1038
+        $cols .= ') as `count`' . (!empty($options['cols']) ? ',' . $options['cols'] : '');
1039 1039
         App::$cur->db->cols = $cols;
1040 1040
         if (!empty($options['group'])) {
1041 1041
             App::$cur->db->group($options['group']);
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
     /**
358 358
      * Information extractor for col relations path
359 359
      * 
360
-     * @param string|array $info
360
+     * @param string $info
361 361
      * @return array
362 362
      */
363 363
     public static function parseColRecursion($info)
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
      * Generate params string for col by name
434 434
      * 
435 435
      * @param string $colName
436
-     * @return boolean|string
436
+     * @return false|string
437 437
      */
438 438
     public static function genColParams($colName)
439 439
     {
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
     /**
574 574
      * return relations list
575 575
      * 
576
-     * @return array
576
+     * @return string
577 577
      */
578 578
     public static function relations()
579 579
     {
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
      * 
1066 1066
      * @param array $params
1067 1067
      * @param array $where
1068
-     * @return boolean
1068
+     * @return false|null
1069 1069
      */
1070 1070
     public static function update($params, $where = [])
1071 1071
     {
Please login to merge, or discard this patch.