@@ -45,6 +45,10 @@ |
||
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 |
@@ -23,6 +23,9 @@ |
||
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; |
@@ -147,6 +147,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -31,6 +31,9 @@ |
||
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); |
@@ -13,20 +13,22 @@ |
||
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 | } |
@@ -52,8 +52,9 @@ |
||
52 | 52 | */ |
53 | 53 | static function get($clean = false) |
54 | 54 | { |
55 | - if (empty($_SESSION['_INJI_MSG'])) |
|
56 | - return []; |
|
55 | + if (empty($_SESSION['_INJI_MSG'])) { |
|
56 | + return []; |
|
57 | + } |
|
57 | 58 | $msgs = $_SESSION['_INJI_MSG']; |
58 | 59 | if ($clean) { |
59 | 60 | $_SESSION['_INJI_MSG'] = []; |
@@ -6,8 +6,9 @@ |
||
6 | 6 | $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2); |
7 | 7 | foreach ($systemModules as $module) { |
8 | 8 | $info = Module::getInfo($module); |
9 | - if (!$info || isset($modules[$module])) |
|
10 | - continue; |
|
9 | + if (!$info || isset($modules[$module])) { |
|
10 | + continue; |
|
11 | + } |
|
11 | 12 | ?> |
12 | 13 | <div class ="form-group"> |
13 | 14 | <div class="checkbox"> |
@@ -16,8 +16,9 @@ |
||
16 | 16 | if (!empty($_POST['UserForms'])) { |
17 | 17 | foreach ($_POST['UserForms'] as $form_id => $inputs) { |
18 | 18 | $form = \UserForms\Form::get((int) $form_id); |
19 | - if (!$form) |
|
20 | - continue; |
|
19 | + if (!$form) { |
|
20 | + continue; |
|
21 | + } |
|
21 | 22 | $formRecive = new \UserForms\Recive(); |
22 | 23 | $formRecive->user_id = (int) \Users\User::$cur->id; |
23 | 24 | $formRecive->form_id = (int) $form_id; |
@@ -42,10 +42,11 @@ |
||
42 | 42 | <select class="form-control" name = 'user_role_id'> |
43 | 43 | <?php |
44 | 44 | foreach ($roles as $role) { |
45 | - if ($role['role_id'] == $user->user_role_id) |
|
46 | - $selected = 'selected = "selected"'; |
|
47 | - else |
|
48 | - $selected = ''; |
|
45 | + if ($role['role_id'] == $user->user_role_id) { |
|
46 | + $selected = 'selected = "selected"'; |
|
47 | + } else { |
|
48 | + $selected = ''; |
|
49 | + } |
|
49 | 50 | echo "<option {$selected} value = '{$role['role_id']}'>{$role['role_name']}</option>"; |
50 | 51 | } |
51 | 52 | ?> |
@@ -83,6 +83,9 @@ |
||
83 | 83 | return null; |
84 | 84 | } |
85 | 85 | |
86 | + /** |
|
87 | + * @return string |
|
88 | + */ |
|
86 | 89 | function colName() |
87 | 90 | { |
88 | 91 | return "{$this->activeForm->requestFormName}[{$this->activeForm->modelName}][{$this->colName}]"; |