@@ -28,7 +28,8 @@ |
||
28 | 28 | } |
29 | 29 | if (!file_exists($absolutePath)) { |
30 | 30 | return ''; |
31 | - } else { |
|
31 | + } |
|
32 | + else { |
|
32 | 33 | $options = []; |
33 | 34 | if ($resize) { |
34 | 35 | $resize = explode('x', $resize); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public static function file($path, $resize = '', $resizeCrop = '', $resizePos = '') { |
23 | 23 | $absolutePath = App::$cur->staticLoader->parsePath($path); |
24 | - $convet = FALSE; |
|
24 | + $convet = false; |
|
25 | 25 | if (!file_exists($absolutePath) && file_exists(mb_convert_encoding($absolutePath, 'Windows-1251', 'UTF-8'))) { |
26 | 26 | $absolutePath = mb_convert_encoding($absolutePath, 'Windows-1251', 'UTF-8'); |
27 | 27 | $convet = true; |
@@ -65,7 +65,8 @@ |
||
65 | 65 | $val = @self::$server->get($name . serialize($params)); |
66 | 66 | if ($val !== false) { |
67 | 67 | return $val; |
68 | - } else { |
|
68 | + } |
|
69 | + else { |
|
69 | 70 | if (is_callable($callback, true)) { |
70 | 71 | $val = $callback($params); |
71 | 72 | self::set($name, $params, $val); |
@@ -105,7 +105,8 @@ |
||
105 | 105 | $moduleClassName = $this->findModuleClass($className); |
106 | 106 | if (!is_bool($moduleClassName) && $moduleClassName != $className) { |
107 | 107 | return $this->_objects[$moduleClassName][$paramsStr] = $this->_objects[$className][$paramsStr] = $this->getObject($moduleClassName); |
108 | - } elseif (Module::installed($className, $this) && class_exists($className)) { |
|
108 | + } |
|
109 | + elseif (Module::installed($className, $this) && class_exists($className)) { |
|
109 | 110 | $this->_objects[$className][$paramsStr] = new $className($this); |
110 | 111 | } |
111 | 112 | if (isset($this->_objects[$className][$paramsStr])) { |
@@ -49,7 +49,8 @@ discard block |
||
49 | 49 | case 'method': |
50 | 50 | if (!empty($colInfo['colParams']['params'])) { |
51 | 51 | $values = call_user_func_array([App::$cur->$colInfo['colParams']['module'], $colInfo['colParams']['method']], $colInfo['colParams']['params']); |
52 | - } else { |
|
52 | + } |
|
53 | + else { |
|
53 | 54 | $values = $colInfo['colParams']['module']->$colInfo['colParams']['method'](); |
54 | 55 | } |
55 | 56 | return !empty($values[$this->model->{$this->valueKey}]) ? $values[$this->model->{$this->valueKey}] : 'Не задано'; |
@@ -63,7 +64,8 @@ discard block |
||
63 | 64 | $file = Files\File::get($this->model->{$this->valueKey}); |
64 | 65 | if ($file) { |
65 | 66 | return '<img src="' . $file->path . '?resize=60x120" />'; |
66 | - } else { |
|
67 | + } |
|
68 | + else { |
|
67 | 69 | return '<img src="/static/system/images/no-image.png?resize=60x120" />'; |
68 | 70 | } |
69 | 71 | case 'bool': |
@@ -45,8 +45,9 @@ discard block |
||
45 | 45 | return self::$_configs['custom'][$path]; |
46 | 46 | } |
47 | 47 | |
48 | - if (!file_exists($path)) |
|
49 | - return []; |
|
48 | + if (!file_exists($path)) { |
|
49 | + return []; |
|
50 | + } |
|
50 | 51 | |
51 | 52 | return self::$_configs['custom'][$path] = include $path; |
52 | 53 | } |
@@ -85,7 +86,8 @@ discard block |
||
85 | 86 | return self::$_configs['shareModules'][$module]; |
86 | 87 | } |
87 | 88 | $path = INJI_PROGRAM_DIR . "/config/modules/{$module}.php"; |
88 | - } else { |
|
89 | + } |
|
90 | + else { |
|
89 | 91 | if (isset(self::$_configs['share'])) { |
90 | 92 | return self::$_configs['share']; |
91 | 93 | } |
@@ -94,14 +96,16 @@ discard block |
||
94 | 96 | if (!file_exists($path)) { |
95 | 97 | if (file_exists(INJI_SYSTEM_DIR . "/modules/{$module}/defaultConfig.php")) { |
96 | 98 | $path = INJI_SYSTEM_DIR . "/modules/{$module}/defaultConfig.php"; |
97 | - } else { |
|
99 | + } |
|
100 | + else { |
|
98 | 101 | return []; |
99 | 102 | } |
100 | 103 | } |
101 | 104 | |
102 | 105 | if ($module) { |
103 | 106 | return self::$_configs['shareModules'][$module] = include $path; |
104 | - } else { |
|
107 | + } |
|
108 | + else { |
|
105 | 109 | return self::$_configs['share'] = include $path; |
106 | 110 | } |
107 | 111 | } |
@@ -122,7 +126,8 @@ discard block |
||
122 | 126 | if ($system) { |
123 | 127 | $appName = 'system'; |
124 | 128 | $appPath = INJI_SYSTEM_DIR; |
125 | - } else { |
|
129 | + } |
|
130 | + else { |
|
126 | 131 | $appName = $app->name; |
127 | 132 | $appPath = $app->path; |
128 | 133 | } |
@@ -176,7 +181,8 @@ discard block |
||
176 | 181 | $path = INJI_PROGRAM_DIR . "/config/modules/{$module}.php"; |
177 | 182 | self::$_configs['shareModules'][$module] = $data; |
178 | 183 | Inji::$inst->event('Config-change-shareModules-' . $module, $data); |
179 | - } else { |
|
184 | + } |
|
185 | + else { |
|
180 | 186 | $path = INJI_PROGRAM_DIR . "/config/config.php"; |
181 | 187 | self::$_configs['share'] = $data; |
182 | 188 | Inji::$inst->event('Config-change-share', $data); |
@@ -66,7 +66,8 @@ |
||
66 | 66 | if (!empty($this->params[0]) && method_exists($this, $this->params[0] . 'Action')) { |
67 | 67 | $this->method = $this->params[0]; |
68 | 68 | $this->params = array_slice($this->params, 1); |
69 | - } elseif (!method_exists($this, $this->method . 'Action')) { |
|
69 | + } |
|
70 | + elseif (!method_exists($this, $this->method . 'Action')) { |
|
70 | 71 | INJI_SYSTEM_ERROR('method not found', true); |
71 | 72 | } |
72 | 73 | if (!$this->checkAccess()) { |
@@ -27,7 +27,8 @@ discard block |
||
27 | 27 | } |
28 | 28 | } |
29 | 29 | return $result; |
30 | - } else { |
|
30 | + } |
|
31 | + else { |
|
31 | 32 | return Router::loadClass($className); |
32 | 33 | } |
33 | 34 | } |
@@ -99,7 +100,8 @@ discard block |
||
99 | 100 | $paths[$code . '_ObjectDir'] = $folder . '/objects/' . $classPath . '/' . $classPath . '.php'; |
100 | 101 | $paths[$code . '_Model'] = $folder . '/models/' . $classPath . '.php'; |
101 | 102 | $paths[$code . '_ModelDir'] = $folder . '/models/' . $classPath . '/' . $classPath . '.php'; |
102 | - } else { |
|
103 | + } |
|
104 | + else { |
|
103 | 105 | $classFile = substr($classPath, strrpos($classPath, '/') + 1); |
104 | 106 | $classPathWithotClass = substr($classPath, 0, strrpos($classPath, '/')); |
105 | 107 |
@@ -81,7 +81,7 @@ |
||
81 | 81 | return true; |
82 | 82 | } |
83 | 83 | } |
84 | - return FALSE; |
|
84 | + return false; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -4,18 +4,18 @@ |
||
4 | 4 | <div class="alert alert-<?= $msg['status']; ?> alert-dismissable"> |
5 | 5 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
6 | 6 | <strong><?php |
7 | - switch ($msg['status']) { |
|
8 | - case 'success': |
|
7 | + switch ($msg['status']) { |
|
8 | + case 'success': |
|
9 | 9 | echo 'Успех!'; |
10 | - break; |
|
11 | - case 'danger': |
|
10 | + break; |
|
11 | + case 'danger': |
|
12 | 12 | case 'warning': |
13 | 13 | echo 'Внимание!'; |
14 | - break; |
|
15 | - default: |
|
14 | + break; |
|
15 | + default: |
|
16 | 16 | echo 'Информация.'; |
17 | - } |
|
18 | - ?></strong> <?= $msg['text']; ?> |
|
17 | + } |
|
18 | + ?></strong> <?= $msg['text']; ?> |
|
19 | 19 | </div> |
20 | 20 | <?php |
21 | 21 | } |