@@ -23,6 +23,9 @@ |
||
| 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 | } |
@@ -145,6 +145,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -30,6 +30,9 @@ |
||
| 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 | |
@@ -12,20 +12,22 @@ |
||
| 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 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($step = NULL, $params = []) { |
|
| 3 | +return function ($step = null, $params = []) { |
|
| 4 | 4 | |
| 5 | 5 | }; |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($step = NULL, $params = []) { |
|
| 3 | +return function ($step = null, $params = []) { |
|
| 4 | 4 | |
| 5 | 5 | }; |
@@ -2,7 +2,7 @@ |
||
| 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 |
@@ -229,17 +229,20 @@ |
||
| 229 | 229 | * @return boolean|\User\User |
| 230 | 230 | */ |
| 231 | 231 | public function get($idn, $ltype = 'id') { |
| 232 | - if (!$idn) |
|
| 233 | - return false; |
|
| 232 | + if (!$idn) { |
|
| 233 | + return false; |
|
| 234 | + } |
|
| 234 | 235 | |
| 235 | - if (is_numeric($idn) && $ltype != 'login') |
|
| 236 | - $user = Users\User::get($idn, 'id'); |
|
| 237 | - elseif ($ltype == 'login') |
|
| 238 | - $user = Users\User::get($idn, 'login'); |
|
| 239 | - else |
|
| 240 | - $user = Users\User::get($idn, 'mail'); |
|
| 241 | - if (!$user) |
|
| 242 | - return []; |
|
| 236 | + if (is_numeric($idn) && $ltype != 'login') { |
|
| 237 | + $user = Users\User::get($idn, 'id'); |
|
| 238 | + } elseif ($ltype == 'login') { |
|
| 239 | + $user = Users\User::get($idn, 'login'); |
|
| 240 | + } else { |
|
| 241 | + $user = Users\User::get($idn, 'mail'); |
|
| 242 | + } |
|
| 243 | + if (!$user) { |
|
| 244 | + return []; |
|
| 245 | + } |
|
| 243 | 246 | |
| 244 | 247 | return $user; |
| 245 | 248 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($step = NULL, $params = []) { |
|
| 3 | +return function ($step = null, $params = []) { |
|
| 4 | 4 | |
| 5 | 5 | }; |
@@ -49,8 +49,9 @@ |
||
| 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'] = []; |