@@ -63,7 +63,9 @@ |
||
63 | 63 | */ |
64 | 64 | public function compileInsertGetId(Builder $builder, $values, $sequence) |
65 | 65 | { |
66 | - if (is_null($sequence)) $sequence = 'id' ; |
|
66 | + if (is_null($sequence)) { |
|
67 | + $sequence = 'id' ; |
|
68 | + } |
|
67 | 69 | |
68 | 70 | return $this->compileInsert($builder, $values).' returning '.$this->wrap($sequence); |
69 | 71 | } |
@@ -37,8 +37,11 @@ |
||
37 | 37 | <div id="frame-code-args-<?=$index?>" class="code-block frame-args"> |
38 | 38 | <?= $frameArgs ?> |
39 | 39 | </div> |
40 | - <?php else: ?> |
|
40 | + <?php else { |
|
41 | + : ?> |
|
41 | 42 | <div class="frame-noArgument"><?= e(__('exception.noArguments')) ?></div> |
42 | - <?php endif; ?> |
|
43 | + <?php endif; |
|
44 | +} |
|
45 | +?> |
|
43 | 46 | </div> |
44 | 47 | <?php endforeach; ?> |
45 | 48 | \ No newline at end of file |
@@ -21,10 +21,13 @@ |
||
21 | 21 | <?php endforeach; ?> |
22 | 22 | </tbody> |
23 | 23 | </table> |
24 | - <?php else : ?> |
|
24 | + <?php else { |
|
25 | + : ?> |
|
25 | 26 | <label class="empty"><?= e($label) ?></label> |
26 | 27 | <span class="empty"><?= e(__('exception.empty')) ?></span> |
27 | - <?php endif; ?> |
|
28 | + <?php endif; |
|
29 | +} |
|
30 | +?> |
|
28 | 31 | </div> |
29 | 32 | <?php endforeach; ?> |
30 | 33 | </div> |
@@ -12,7 +12,8 @@ discard block |
||
12 | 12 | <div class="frame-info-class"> |
13 | 13 | <?php if ($frame->getClass() == '') : ?> |
14 | 14 | <span class="frame-function"><?= e($frame->getFunction()) ?></span> |
15 | - <?php else: ?> |
|
15 | + <?php else { |
|
16 | + : ?> |
|
16 | 17 | <span class="frame-class"><?= e($frame->getClass()) ?></span> |
17 | 18 | <?php if ($frame->getFunction() != '') : ?> |
18 | 19 | <span class="frame-function"><?= e($frame->getFunction()) ?></span> |
@@ -26,5 +27,7 @@ discard block |
||
26 | 27 | </div> |
27 | 28 | |
28 | 29 | </div> |
29 | -<?php endforeach; ?> |
|
30 | +<?php endforeach; |
|
31 | +} |
|
32 | +?> |
|
30 | 33 | </div> |
31 | 34 | \ No newline at end of file |
@@ -4,9 +4,12 @@ |
||
4 | 4 | <?php foreach ($class as $i => $name) : ?> |
5 | 5 | <?php if ($i == count($class) - 1): ?> |
6 | 6 | <h1><?= $template->escape($name) ?></h1> |
7 | - <?php else: ?> |
|
7 | + <?php else { |
|
8 | + : ?> |
|
8 | 9 | <?= $template->escape($name).' \\' ?> |
9 | - <?php endif; ?> |
|
10 | + <?php endif; |
|
11 | +} |
|
12 | +?> |
|
10 | 13 | <?php endforeach; ?> |
11 | 14 | <?php if ($code): ?> |
12 | 15 | <span class="subtitle" title="Exception Code">(<?= $template->escape($code) ?>)</span> |
@@ -51,7 +51,9 @@ |
||
51 | 51 | */ |
52 | 52 | public function get($key) |
53 | 53 | { |
54 | - if ( ! isset($this->storage[$key])) return; |
|
54 | + if ( ! isset($this->storage[$key])) { |
|
55 | + return; |
|
56 | + } |
|
55 | 57 | |
56 | 58 | $item = $this->storage[$key]; |
57 | 59 |
@@ -206,7 +206,9 @@ |
||
206 | 206 | */ |
207 | 207 | public static function limit($value, $limit, $end = '...') |
208 | 208 | { |
209 | - if (static::length($value) <= $limit) return $value; |
|
209 | + if (static::length($value) <= $limit) { |
|
210 | + return $value; |
|
211 | + } |
|
210 | 212 | |
211 | 213 | return rtrim(mb_substr($value, 0, $limit, 'UTF-8')).$end; |
212 | 214 | } |
@@ -22,11 +22,21 @@ |
||
22 | 22 | */ |
23 | 23 | |
24 | 24 | // Define the absolute paths for configured directories |
25 | -if ( ! defined('APP_PATH')) define('APP_PATH', realpath($paths['path.app']).DIRECTORY_SEPARATOR); |
|
26 | -if ( ! defined('BST_PATH')) define('BST_PATH', realpath($paths['path.bootstrap']).DIRECTORY_SEPARATOR); |
|
27 | -if ( ! defined('CON_PATH')) define('CON_PATH', realpath($paths['path.config']).DIRECTORY_SEPARATOR); |
|
28 | -if ( ! defined('RES_PATH')) define('RES_PATH', realpath($paths['path.resources']).DIRECTORY_SEPARATOR); |
|
29 | -if ( ! defined('SYS_PATH')) define('SYS_PATH', realpath($paths['path.sys']).DIRECTORY_SEPARATOR); |
|
25 | +if ( ! defined('APP_PATH')) { |
|
26 | + define('APP_PATH', realpath($paths['path.app']).DIRECTORY_SEPARATOR); |
|
27 | +} |
|
28 | +if ( ! defined('BST_PATH')) { |
|
29 | + define('BST_PATH', realpath($paths['path.bootstrap']).DIRECTORY_SEPARATOR); |
|
30 | +} |
|
31 | +if ( ! defined('CON_PATH')) { |
|
32 | + define('CON_PATH', realpath($paths['path.config']).DIRECTORY_SEPARATOR); |
|
33 | +} |
|
34 | +if ( ! defined('RES_PATH')) { |
|
35 | + define('RES_PATH', realpath($paths['path.resources']).DIRECTORY_SEPARATOR); |
|
36 | +} |
|
37 | +if ( ! defined('SYS_PATH')) { |
|
38 | + define('SYS_PATH', realpath($paths['path.sys']).DIRECTORY_SEPARATOR); |
|
39 | +} |
|
30 | 40 | |
31 | 41 | // Call the file constants |
32 | 42 | require CON_PATH.'constants.php'; |
@@ -232,7 +232,9 @@ discard block |
||
232 | 232 | public static function first($array, callable $callback, $default = null) |
233 | 233 | { |
234 | 234 | foreach ($array as $key => $value) { |
235 | - if (call_user_func($callback, $key, $value)) return $value; |
|
235 | + if (call_user_func($callback, $key, $value)) { |
|
236 | + return $value; |
|
237 | + } |
|
236 | 238 | } |
237 | 239 | |
238 | 240 | return value($default); |
@@ -294,9 +296,13 @@ discard block |
||
294 | 296 | */ |
295 | 297 | public static function has($array, $key) |
296 | 298 | { |
297 | - if (empty($array) || is_null($key)) return false; |
|
299 | + if (empty($array) || is_null($key)) { |
|
300 | + return false; |
|
301 | + } |
|
298 | 302 | |
299 | - if (array_key_exists($key, $array)) return true; |
|
303 | + if (array_key_exists($key, $array)) { |
|
304 | + return true; |
|
305 | + } |
|
300 | 306 | |
301 | 307 | foreach (explode('.', $key) as $segment) { |
302 | 308 | if ( ! is_array($array) || ! static::exists($array, $segment)) { |