Completed
Pull Request — master (#4)
by
unknown
05:09
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 3 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.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     static function uriParse($uri)
39 39
     {
40 40
         $answerPos = strpos($uri, '?');
41
-        $params = array_slice(explode('/', substr($uri, 0, $answerPos ? $answerPos : strlen($uri) )), 1);
41
+        $params = array_slice(explode('/', substr($uri, 0, $answerPos ? $answerPos : strlen($uri))), 1);
42 42
 
43 43
         foreach ($params as $key => $param) {
44 44
             if ($param != '') {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     static function resizeImage($img_path, $max_width = 1000, $max_height = 1000, $crop = false, $pos = 'center')
86 86
     {
87 87
         ini_set("gd.jpeg_ignore_warning", 1);
88
-        list( $img_width, $img_height, $img_type, $img_tag ) = getimagesize($img_path);
88
+        list($img_width, $img_height, $img_type, $img_tag) = getimagesize($img_path);
89 89
         switch ($img_type) {
90 90
             case 1:
91 91
                 $img_type = 'gif';
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 
109 109
         if ($crop === true || $crop == 'q') {
110 110
             if ($img_width > $img_height) {
111
-                $imgX = floor(( $img_width - $img_height ) / 2);
111
+                $imgX = floor(($img_width - $img_height) / 2);
112 112
                 $imgY = 0;
113 113
                 $img_width = $img_height;
114 114
                 $new_width = $max_width;
115 115
                 $new_height = $max_height;
116 116
             } else {
117 117
                 $imgX = 0;
118
-                $imgY = floor(( $img_height - $img_width ) / 2);
118
+                $imgY = floor(($img_height - $img_width) / 2);
119 119
                 $img_height = $img_width;
120 120
                 $new_width = $max_width;
121 121
                 $new_height = $max_height;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             $new_width = $max_width;
137 137
             $new_height = $max_height;
138 138
 //Находим начальные координаты (центрируем новое изображение)
139
-            $imgX = (int) (($ow / 2) - ($img_width / 2) );
139
+            $imgX = (int) (($ow / 2) - ($img_width / 2));
140 140
             if ($pos == 'center') {
141 141
                 $imgY = (int) (($oh / 2) - ($img_height / 2));
142 142
             } else {
Please login to merge, or discard this patch.
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,8 +58,9 @@  discard block
 block discarded – undo
58 58
      */
59 59
     static function createDir($path)
60 60
     {
61
-        if (file_exists($path))
62
-            return true;
61
+        if (file_exists($path)) {
62
+                    return true;
63
+        }
63 64
 
64 65
         $path = explode('/', $path);
65 66
         $cur = '';
@@ -101,10 +102,11 @@  discard block
 block discarded – undo
101 102
         $imagecreatefromX = "imagecreatefrom{$img_type}";
102 103
         $src_res = $imagecreatefromX($img_path);
103 104
 
104
-        if ($img_width / $max_width > $img_height / $max_height)
105
-            $separator = $img_width / $max_width;
106
-        else
107
-            $separator = $img_height / $max_height;
105
+        if ($img_width / $max_width > $img_height / $max_height) {
106
+                    $separator = $img_width / $max_width;
107
+        } else {
108
+                    $separator = $img_height / $max_height;
109
+        }
108 110
 
109 111
         if ($crop === true || $crop == 'q') {
110 112
             if ($img_width > $img_height) {
Please login to merge, or discard this patch.
system/modules/Db/objects/Mysql/Query.php 3 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.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
                     $newValue = '';
191 191
                     foreach ($value as $item) {
192 192
                         if ($newValue) {
193
-                            $newValue.=',';
193
+                            $newValue .= ',';
194 194
                         }
195 195
                         if (is_string($item)) {
196
-                            $newValue .='"' . $item . '"';
196
+                            $newValue .= '"' . $item . '"';
197 197
                         } else {
198
-                            $newValue .=$item;
198
+                            $newValue .= $item;
199 199
                         }
200 200
                     }
201 201
                     $value = '(' . $newValue . ')';
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
                     }
310 310
                 }
311 311
                 $update = implode(',', $updates);
312
-                $query .=" SET {$update}";
312
+                $query .= " SET {$update}";
313 313
             case 'SELECT':
314 314
             case 'DELETE':
315 315
                 $this->buildWhere($this->where);
Please login to merge, or discard this patch.
Braces   +51 added lines, -40 removed lines patch added patch discarded remove patch
@@ -126,12 +126,14 @@  discard block
 block discarded – undo
126 126
         if (!is_array($order)) {
127 127
             $this->order[] = "{$order} {$type}";
128 128
         } else {
129
-            foreach ($order as $item)
130
-                if (!is_array($item)) {
129
+            foreach ($order as $item) {
130
+                            if (!is_array($item)) {
131 131
                     call_user_func_array(array($this, 'order'), $order);
132
+            }
132 133
                     break;
133
-                } else
134
-                    $this->order($item);
134
+                } else {
135
+                                    $this->order($item);
136
+                }
135 137
         }
136 138
     }
137 139
 
@@ -140,8 +142,9 @@  discard block
 block discarded – undo
140 142
         $start = intval($start);
141 143
         $len = intval($len);
142 144
         $this->limit = "LIMIT {$start}";
143
-        if ($len !== 0)
144
-            $this->limit .= ",{$len}";
145
+        if ($len !== 0) {
146
+                    $this->limit .= ",{$len}";
147
+        }
145 148
     }
146 149
 
147 150
     public function buildJoin($table, $where = false, $type = 'LEFT', $alias = '')
@@ -154,10 +157,12 @@  discard block
 block discarded – undo
154 157
             }
155 158
         } else {
156 159
             $join .= " {$type} JOIN {$this->curInstance->table_prefix}{$table}";
157
-            if ($alias)
158
-                $join .= " AS `{$alias}`";
159
-            if ($where)
160
-                $join .= " ON {$where}";
160
+            if ($alias) {
161
+                            $join .= " AS `{$alias}`";
162
+            }
163
+            if ($where) {
164
+                            $join .= " ON {$where}";
165
+            }
161 166
         }
162 167
         return $join;
163 168
     }
@@ -177,13 +182,15 @@  discard block
 block discarded – undo
177 182
                 $operation = '=';
178 183
             }
179 184
 
180
-            if ($concatenation === false)
181
-                $concatenation = 'AND';
182
-            elseif ($concatenation === true)
183
-                $concatenation = '';
185
+            if ($concatenation === false) {
186
+                            $concatenation = 'AND';
187
+            } elseif ($concatenation === true) {
188
+                            $concatenation = '';
189
+            }
184 190
 
185
-            if ($this->whereString == NULL)
186
-                $this->whereString = ' WHERE ';
191
+            if ($this->whereString == NULL) {
192
+                            $this->whereString = ' WHERE ';
193
+            }
187 194
 
188 195
             if (stristr($operation, 'IN') || stristr($operation, 'NOT IN')) {
189 196
                 if (is_array($value)) {
@@ -199,22 +206,22 @@  discard block
 block discarded – undo
199 206
                         }
200 207
                     }
201 208
                     $value = '(' . $newValue . ')';
202
-                } elseif (!preg_match('!\(!', $value) && !preg_match('![^0-9,\.\(\) ]!', $value))
203
-                    $value = "({$value})";
204
-                elseif (preg_match('!\(!', $value) && preg_match('![^0-9,\.\(\) ]!', $value))
205
-                    $value = "\"{$value}\"";
206
-            }
207
-            elseif (!in_array($value, array('CURRENT_TIMESTAMP'))) {
209
+                } elseif (!preg_match('!\(!', $value) && !preg_match('![^0-9,\.\(\) ]!', $value)) {
210
+                                    $value = "({$value})";
211
+                } elseif (preg_match('!\(!', $value) && preg_match('![^0-9,\.\(\) ]!', $value)) {
212
+                                    $value = "\"{$value}\"";
213
+                }
214
+            } elseif (!in_array($value, array('CURRENT_TIMESTAMP'))) {
208 215
                 $this->params[] = $value;
209 216
                 $value = "?";
210 217
             }
211 218
 
212
-            if (substr($this->whereString, -1, 1) == '(' || substr($this->whereString, -2, 2) == 'E ')
213
-                $this->whereString .= " {$where} {$operation} {$value} ";
214
-            else
215
-                $this->whereString .= "{$concatenation} {$where} {$operation} {$value} ";
216
-        }
217
-        else {
219
+            if (substr($this->whereString, -1, 1) == '(' || substr($this->whereString, -2, 2) == 'E ') {
220
+                            $this->whereString .= " {$where} {$operation} {$value} ";
221
+            } else {
222
+                            $this->whereString .= "{$concatenation} {$where} {$operation} {$value} ";
223
+            }
224
+        } else {
218 225
             $i = -1;
219 226
             while (isset($where[++$i])) {
220 227
                 $item = $where[$i];
@@ -229,28 +236,32 @@  discard block
 block discarded – undo
229 236
                         $this->whereString .= "{$concatenation} ";
230 237
                     }
231 238
 
232
-                    if ($this->whereString != NULL)
233
-                        $this->whereString .= '(';
234
-                    else
235
-                        $this->whereString = 'WHERE (';
239
+                    if ($this->whereString != NULL) {
240
+                                            $this->whereString .= '(';
241
+                    } else {
242
+                                            $this->whereString = 'WHERE (';
243
+                    }
236 244
                 }
237 245
 
238 246
                 if (!is_array($item)) {
239 247
                     call_user_func_array(array($this, 'buildWhere'), $where);
240 248
                     break;
241 249
                 } else {
242
-                    if ($this->whereString != NULL && substr($this->whereString, -1, 1) != '(')
243
-                        if (!isset($item[3]))
250
+                    if ($this->whereString != NULL && substr($this->whereString, -1, 1) != '(') {
251
+                                            if (!isset($item[3]))
244 252
                             $concatenation = 'AND';
245
-                        else
246
-                            $concatenation = $item[3];
247
-                    elseif (substr($this->whereString, -1, 1) != '(')
248
-                        $this->whereString = 'WHERE ';
253
+                    } else {
254
+                                                    $concatenation = $item[3];
255
+                        }
256
+                    elseif (substr($this->whereString, -1, 1) != '(') {
257
+                                            $this->whereString = 'WHERE ';
258
+                    }
249 259
 
250 260
                     $this->buildWhere($item);
251 261
                 }
252
-                if (!isset($where[$i + 1]) && isset($where[$i - 1]))
253
-                    $this->whereString .= ') ';
262
+                if (!isset($where[$i + 1]) && isset($where[$i - 1])) {
263
+                                    $this->whereString .= ') ';
264
+                }
254 265
             }
255 266
         }
256 267
     }
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 3 patches
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.
Braces   +43 added lines, -32 removed lines patch added patch discarded remove patch
@@ -140,8 +140,9 @@  discard block
 block discarded – undo
140 140
 
141 141
     private function parseRaw($source)
142 142
     {
143
-        if (!$source)
144
-            return [];
143
+        if (!$source) {
144
+                    return [];
145
+        }
145 146
 
146 147
         preg_match_all("|{([^}]+)}|", $source, $result);
147 148
         return $result[1];
@@ -327,10 +328,11 @@  discard block
 block discarded – undo
327 328
                         $this->ResolveCssHref($css, $type, $hrefs);
328 329
                         continue;
329 330
                     }
330
-                    if (strpos($css, '//') !== false)
331
-                        $href = $css;
332
-                    else
333
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
331
+                    if (strpos($css, '//') !== false) {
332
+                                            $href = $css;
333
+                    } else {
334
+                                            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
335
+                    }
334 336
                     $hrefs[$href] = $href;
335 337
                 }
336 338
                 break;
@@ -340,10 +342,11 @@  discard block
 block discarded – undo
340 342
                         $this->ResolveCssHref($css, $type, $hrefs);
341 343
                         continue;
342 344
                     }
343
-                    if (strpos($css, '://') !== false)
344
-                        $href = $css;
345
-                    else
346
-                        $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}";
345
+                    if (strpos($css, '://') !== false) {
346
+                                            $href = $css;
347
+                    } else {
348
+                                            $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}";
349
+                    }
347 350
                     $hrefs[$href] = $href;
348 351
                 }
349 352
                 break;
@@ -353,10 +356,11 @@  discard block
 block discarded – undo
353 356
                         $this->ResolveCssHref($css, $type, $hrefs);
354 357
                         continue;
355 358
                     }
356
-                    if (strpos($css, '//') !== false)
357
-                        $href = $css;
358
-                    else
359
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
359
+                    if (strpos($css, '//') !== false) {
360
+                                            $href = $css;
361
+                    } else {
362
+                                            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
363
+                    }
360 364
                     $hrefs[$href] = $href;
361 365
                 }
362 366
                 break;
@@ -410,8 +414,9 @@  discard block
 block discarded – undo
410 414
         $noParsedScripts = [];
411 415
         foreach ($scripts as $script) {
412 416
             if (is_string($script)) {
413
-                if (!empty($urls[$script]))
414
-                    continue;
417
+                if (!empty($urls[$script])) {
418
+                                    continue;
419
+                }
415 420
 
416 421
                 $path = $this->app->staticLoader->parsePath($script);
417 422
                 if (file_exists($path)) {
@@ -422,8 +427,9 @@  discard block
 block discarded – undo
422 427
                     $noParsedScripts[$script] = $script;
423 428
                 }
424 429
             } elseif (!empty($script['file'])) {
425
-                if (!empty($urls[$script['file']]))
426
-                    continue;
430
+                if (!empty($urls[$script['file']])) {
431
+                                    continue;
432
+                }
427 433
 
428 434
                 $path = $this->app->staticLoader->parsePath($script['file']);
429 435
                 if (file_exists($path)) {
@@ -482,12 +488,14 @@  discard block
 block discarded – undo
482 488
                         $this->genScriptArray($js, $type, $resultArray);
483 489
                         continue;
484 490
                     }
485
-                    if (strpos($js, '//') !== false)
486
-                        $href = $js;
487
-                    else
488
-                        $href = $this->getHref('js', $js);
489
-                    if (!$href)
490
-                        continue;
491
+                    if (strpos($js, '//') !== false) {
492
+                                            $href = $js;
493
+                    } else {
494
+                                            $href = $this->getHref('js', $js);
495
+                    }
496
+                    if (!$href) {
497
+                                            continue;
498
+                    }
491 499
 
492 500
                     $resultArray[] = $href;
493 501
                 }
@@ -498,10 +506,11 @@  discard block
 block discarded – undo
498 506
                         $this->genScriptArray($js, $type, $resultArray);
499 507
                         continue;
500 508
                     }
501
-                    if (strpos($js, '//') !== false)
502
-                        $href = $js;
503
-                    else
504
-                        $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}";
509
+                    if (strpos($js, '//') !== false) {
510
+                                            $href = $js;
511
+                    } else {
512
+                                            $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}";
513
+                    }
505 514
                     $resultArray[] = $href;
506 515
                 }
507 516
                 break;
@@ -517,8 +526,9 @@  discard block
 block discarded – undo
517 526
                         $asset = [];
518 527
                     }
519 528
                     $asset['file'] = $this->getHref('js', $js);
520
-                    if (!$asset['file'])
521
-                        continue;
529
+                    if (!$asset['file']) {
530
+                                            continue;
531
+                    }
522 532
                     $resultArray[] = $asset;
523 533
                 }
524 534
                 break;
@@ -568,8 +578,9 @@  discard block
 block discarded – undo
568 578
                         $paramArray = true;
569 579
                     }
570 580
                 }
571
-                if (!$paramArray)
572
-                    $lineParams = ':' . implode(':', $_params);
581
+                if (!$paramArray) {
582
+                                    $lineParams = ':' . implode(':', $_params);
583
+                }
573 584
             }
574 585
         }
575 586
         echo "<!--start:{WIDGET:{$_widgetName}{$lineParams}}-->\n";
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -187,16 +187,16 @@  discard block
 block discarded – undo
187 187
     {
188 188
         $pos = strpos($source, $rawTag) - 1;
189 189
         echo substr($source, 0, $pos);
190
-        return substr($source, ( $pos + strlen($rawTag) + 2));
190
+        return substr($source, ($pos + strlen($rawTag) + 2));
191 191
     }
192 192
 
193 193
     public function getHref($type, $params)
194 194
     {
195 195
         $href = '';
196 196
         if (is_string($params)) {
197
-            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params;
197
+            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $params;
198 198
         } elseif (empty($params['template']) && !empty($params['file'])) {
199
-            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params['file'];
199
+            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $params['file'];
200 200
         } elseif (!empty($params['template']) && !empty($params['file'])) {
201 201
             $href = $this->app->templatesPath . "/{$this->template->name}/{$type}/{$params['file']}";
202 202
         }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
         $this->checkNeedLibs();
257 257
         $this->parseCss();
258
-        echo "\n        <script src='" . Statics::file(($this->app->type != 'app' ? '/' . $this->app->name : '' ) . "/static/system/js/Inji.js") . "'></script>";
258
+        echo "\n        <script src='" . Statics::file(($this->app->type != 'app' ? '/' . $this->app->name : '') . "/static/system/js/Inji.js") . "'></script>";
259 259
     }
260 260
 
261 261
     public function parseCss()
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             if (file_exists($path)) {
280 280
                 $this->loadedCss[$href] = $href;
281 281
                 $urls[$href] = $path;
282
-                $timeStr.=filemtime($path);
282
+                $timeStr .= filemtime($path);
283 283
             } else {
284 284
                 echo "\n        <link href='{$href}' rel='stylesheet' type='text/css' />";
285 285
             }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                     if (strpos($css, '//') !== false)
331 331
                         $href = $css;
332 332
                     else
333
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
333
+                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $css;
334 334
                     $hrefs[$href] = $href;
335 335
                 }
336 336
                 break;
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
                     if (strpos($css, '//') !== false)
357 357
                         $href = $css;
358 358
                     else
359
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
359
+                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $css;
360 360
                     $hrefs[$href] = $href;
361 361
                 }
362 362
                 break;
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
                 if (file_exists($path)) {
418 418
                     $nativeUrl[$script] = $script;
419 419
                     $urls[$script] = $path;
420
-                    $timeStr.=filemtime($path);
420
+                    $timeStr .= filemtime($path);
421 421
                 } else {
422 422
                     $noParsedScripts[$script] = $script;
423 423
                 }
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
                     if (!empty($script['name'])) {
433 433
                         $onLoadModules[$script['name']] = $script['name'];
434 434
                     }
435
-                    $timeStr.=filemtime($path);
435
+                    $timeStr .= filemtime($path);
436 436
                 } else {
437 437
                     $noParsedScripts[$script] = $script;
438 438
                 }
Please login to merge, or discard this patch.
system/objects/CodeGenerator.php 3 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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
         if ($level == 0)
17 17
             $return = "[";
18 18
         foreach ($data as $key => $item) {
19
-            $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "'{$key}' => ";
19
+            $return .= "\n" . str_repeat(' ', ($level * 4 + 4)) . "'{$key}' => ";
20 20
             if (!is_array($item))
21 21
                 $return .= "'{$item}',";
22 22
             else {
23 23
                 $return .= "[";
24 24
                 $return .= rtrim(self::genArray($item, $level + 1), ',');
25
-                $return .= "\n" . str_repeat(' ', ( $level * 4 + 4)) . "],";
25
+                $return .= "\n" . str_repeat(' ', ($level * 4 + 4)) . "],";
26 26
             }
27 27
         }
28 28
         if ($level == 0)
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/Html.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $html = "<{$tag}";
25 25
         if ($attributes && is_array($attributes)) {
26 26
             foreach ($attributes as $key => $value) {
27
-                $html .=" {$key} = '";
27
+                $html .= " {$key} = '";
28 28
                 if (!is_array($value)) {
29 29
                     $html .= addcslashes($value, "'");
30 30
                 } else {
Please login to merge, or discard this patch.