@@ -42,7 +42,7 @@ |
||
42 | 42 | $options = $this->properties['options']; |
43 | 43 | unset($this->properties['options']); |
44 | 44 | if (!Obj::isArray($options) || count($options) < 1) { |
45 | - throw new SyntaxException('Radio field ' . self::nohtml($this->name) . ' have no options passed'); |
|
45 | + throw new SyntaxException('Radio field '.self::nohtml($this->name).' have no options passed'); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // value is not used there |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | // check if cache is enabled |
40 | 40 | if (App::$Cache !== null) { |
41 | 41 | // try to get bootable class map from cache, or initialize parsing |
42 | - if (App::$Cache->get('boot.' . env_name . '.class.map') !== null) { |
|
43 | - $this->objects = App::$Cache->get('boot.' . env_name . '.class.map'); |
|
42 | + if (App::$Cache->get('boot.'.env_name.'.class.map') !== null) { |
|
43 | + $this->objects = App::$Cache->get('boot.'.env_name.'.class.map'); |
|
44 | 44 | } else { |
45 | 45 | $this->compileBootableClasses(); |
46 | - App::$Cache->set('boot.' . env_name . '.class.map', $this->objects, static::CACHE_TREE_TIME); |
|
46 | + App::$Cache->set('boot.'.env_name.'.class.map', $this->objects, static::CACHE_TREE_TIME); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | } |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | { |
90 | 90 | // list app root's |
91 | 91 | foreach ($this->appRoots as $app) { |
92 | - $app .= '/Apps/Controller/' . env_name; |
|
92 | + $app .= '/Apps/Controller/'.env_name; |
|
93 | 93 | $files = File::listFiles($app, ['.php'], true); |
94 | 94 | foreach ($files as $file) { |
95 | 95 | // define full class name with namespace |
96 | - $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file); |
|
96 | + $class = 'Apps\Controller\\'.env_name.'\\'.Str::cleanExtension($file); |
|
97 | 97 | // check if class exists (must be loaded over autoloader), boot method exist and this is controller instanceof |
98 | 98 | if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Controller', true)) { |
99 | 99 | $this->objects[] = $class; |
@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | |
104 | 104 | // list widget root's |
105 | 105 | foreach ($this->widgetRoots as $widget) { |
106 | - $widget .= '/Widgets/' . env_name; |
|
106 | + $widget .= '/Widgets/'.env_name; |
|
107 | 107 | // widgets are packed in directory, classname should be the same with root directory name |
108 | 108 | $dirs = Directory::scan($widget, GLOB_ONLYDIR, true); |
109 | 109 | if (!Obj::isArray($dirs)) { |
110 | 110 | continue; |
111 | 111 | } |
112 | 112 | foreach ($dirs as $instance) { |
113 | - $class = 'Widgets\\' . env_name . '\\' . $instance . '\\' . $instance; |
|
113 | + $class = 'Widgets\\'.env_name.'\\'.$instance.'\\'.$instance; |
|
114 | 114 | if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Widget', true)) { |
115 | 115 | $this->objects[] = $class; |
116 | 116 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | /** |
28 | 28 | * BootManager constructor. Pass composer loader inside |
29 | - * @param bool|object $loader |
|
29 | + * @param boolean $loader |
|
30 | 30 | */ |
31 | 31 | public function __construct($loader = false) |
32 | 32 | { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $purifier = App::$Memory->get('object.purifier.helpers'); |
25 | 25 | } else { |
26 | 26 | $config = \HTMLPurifier_Config::createDefault(); |
27 | - $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/'); |
|
27 | + $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/'); |
|
28 | 28 | $config->set('AutoFormat.AutoParagraph', false); |
29 | 29 | |
30 | 30 | // allow use target=_blank for links |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | $build = null; |
65 | 65 | foreach ($property as $p => $v) { |
66 | 66 | if ($v === null || $v === false || $v === true) { |
67 | - $build .= ' ' . self::nohtml($p); |
|
67 | + $build .= ' '.self::nohtml($p); |
|
68 | 68 | } else { |
69 | - $build .= ' ' . self::nohtml($p) . '="' . self::nohtml($v) . '"'; |
|
69 | + $build .= ' '.self::nohtml($p).'="'.self::nohtml($v).'"'; |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | return $build; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public static function buildSingleTag($tagName, array $property = null, $closeSlash = true) |
83 | 83 | { |
84 | - return '<' . self::nohtml($tagName) . self::applyProperty($property) . ($closeSlash ? '/>' : '>'); |
|
84 | + return '<'.self::nohtml($tagName).self::applyProperty($property).($closeSlash ? '/>' : '>'); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $value = self::nohtml($value); |
100 | 100 | } |
101 | 101 | |
102 | - return '<' . $tagName . self::applyProperty($property) . '>' . $value . '</' . $tagName . '>'; |
|
102 | + return '<'.$tagName.self::applyProperty($property).'>'.$value.'</'.$tagName.'>'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -141,15 +141,15 @@ discard block |
||
141 | 141 | if (!Str::contains('/', $elementPoint) || count($elementArray) < 2) { |
142 | 142 | $active = $elementPoint === $currentPoint; |
143 | 143 | } else { |
144 | - $elementPoint = $elementArray[0] . '/' . $elementArray[1]; |
|
144 | + $elementPoint = $elementArray[0].'/'.$elementArray[1]; |
|
145 | 145 | $active = Str::startsWith($elementPoint, $currentPoint); |
146 | 146 | } |
147 | 147 | break; |
148 | 148 | case 'id': |
149 | 149 | $elementArray = explode('/', $elementPoint); |
150 | - $elementPoint = $elementArray[0] . '/' . $elementArray[1]; |
|
150 | + $elementPoint = $elementArray[0].'/'.$elementArray[1]; |
|
151 | 151 | if (null !== $elementArray[2]) { |
152 | - $elementPoint .= '/' . $elementArray[2]; |
|
152 | + $elementPoint .= '/'.$elementArray[2]; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | $active = Str::startsWith($elementPoint, $currentPoint); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | public static function convertLink($uri) |
207 | 207 | { |
208 | - $link = App::$Alias->baseUrl . '/'; |
|
208 | + $link = App::$Alias->baseUrl.'/'; |
|
209 | 209 | if (Obj::isArray($uri)) { |
210 | 210 | $link .= Url::buildPathway($uri); |
211 | 211 | } elseif (Str::startsWith('http', $uri)) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | $hash = null; |
19 | 19 | foreach ($this as $property => $value) { |
20 | - $hash = md5($hash . $property . '=' . $value); |
|
20 | + $hash = md5($hash.$property.'='.$value); |
|
21 | 21 | } |
22 | 22 | return $hash; |
23 | 23 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | public static function to($controller_action, $id = null, $add = null, array $params = null, $encode = true) |
24 | 24 | { |
25 | 25 | $pathway = self::buildPathway([$controller_action, $id, $add, $params], $encode); |
26 | - return App::$Alias->baseUrl . '/' . $pathway; |
|
26 | + return App::$Alias->baseUrl.'/'.$pathway; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $controller = Str::lastIn($controller, '\\', true); |
61 | 61 | } |
62 | 62 | |
63 | - $response = $controller . '/' . $action; |
|
63 | + $response = $controller.'/'.$action; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // check if controller and action is defined |
@@ -70,17 +70,17 @@ discard block |
||
70 | 70 | |
71 | 71 | // id is defined? |
72 | 72 | if (isset($to[1]) && !Str::likeEmpty($to[1])) { |
73 | - $response .= '/' . self::safeUri($to[1], $encode); |
|
73 | + $response .= '/'.self::safeUri($to[1], $encode); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | // add param is defined? |
77 | 77 | if (isset($to[2]) && !Str::likeEmpty($to[2])) { |
78 | - $response .= '/' . self::safeUri($to[2], $encode); |
|
78 | + $response .= '/'.self::safeUri($to[2], $encode); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | // try to find static alias |
82 | - if (isset($routing['Alias'][env_name]) && Arr::in('/' . $response, $routing['Alias'][env_name])) { |
|
83 | - $pathAlias = array_search('/' . $response, $routing['Alias'][env_name]); |
|
82 | + if (isset($routing['Alias'][env_name]) && Arr::in('/'.$response, $routing['Alias'][env_name])) { |
|
83 | + $pathAlias = array_search('/'.$response, $routing['Alias'][env_name]); |
|
84 | 84 | if ($pathAlias !== false) { |
85 | 85 | $response = Str::lowerCase(trim($pathAlias, '/')); |
86 | 86 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | $queryString = http_build_query($to[3]); |
98 | 98 | if (Str::length($queryString) > 0) { |
99 | - $response .= '?' . http_build_query($to[3]); |
|
99 | + $response .= '?'.http_build_query($to[3]); |
|
100 | 100 | } |
101 | 101 | if ($anchor !== false) { |
102 | 102 | $response .= $anchor; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public static function buildPathwayFromRequest() |
119 | 119 | { |
120 | 120 | return self::buildPathway([ |
121 | - Str::lowerCase(App::$Request->getController()) . '/' . Str::lowerCase(App::$Request->getAction()), |
|
121 | + Str::lowerCase(App::$Request->getController()).'/'.Str::lowerCase(App::$Request->getAction()), |
|
122 | 122 | App::$Request->getID(), |
123 | 123 | App::$Request->getAdd(), |
124 | 124 | App::$Request->query->all() |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | $to = [$to]; |
141 | 141 | } |
142 | 142 | // call Url::to(args) |
143 | - $callbackTo = call_user_func_array([__NAMESPACE__ . '\Url', 'to'], $to); |
|
143 | + $callbackTo = call_user_func_array([__NAMESPACE__.'\Url', 'to'], $to); |
|
144 | 144 | |
145 | - return '<a href="' . $callbackTo . '"' . $compile_property . '>' . $name . '</a>'; |
|
145 | + return '<a href="'.$callbackTo.'"'.$compile_property.'>'.$name.'</a>'; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -155,19 +155,19 @@ discard block |
||
155 | 155 | { |
156 | 156 | /** @var array $configs */ |
157 | 157 | $configs = \App::$Properties->getAll('default'); |
158 | - $httpHost = $configs['baseProto'] . '://' . $configs['baseDomain']; |
|
158 | + $httpHost = $configs['baseProto'].'://'.$configs['baseDomain']; |
|
159 | 159 | if ($configs['basePath'] !== '/') { |
160 | - $httpHost .= $configs['basePath'] . '/'; |
|
160 | + $httpHost .= $configs['basePath'].'/'; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | // check if is this is URI not URL |
164 | 164 | if (!Str::startsWith($httpHost, $uri)) { |
165 | 165 | // check if lang is defined in URI or define it |
166 | 166 | if ($lang !== null && $configs['multiLanguage'] && !Str::startsWith($lang, $uri)) { |
167 | - $uri = $lang . '/' . ltrim($uri, '/'); |
|
167 | + $uri = $lang.'/'.ltrim($uri, '/'); |
|
168 | 168 | } |
169 | 169 | // add basic httpHost data |
170 | - $uri = rtrim($httpHost, '/') . '/' . ltrim($uri, '/'); |
|
170 | + $uri = rtrim($httpHost, '/').'/'.ltrim($uri, '/'); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | return $uri; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->baseDomain = App::$Properties->get('baseDomain'); |
93 | 93 | } |
94 | 94 | // build script url |
95 | - $this->scriptUrl = App::$Request->getScheme() . '://' . $this->baseDomain; |
|
95 | + $this->scriptUrl = App::$Request->getScheme().'://'.$this->baseDomain; |
|
96 | 96 | if (App::$Properties->get('basePath') !== '/') { |
97 | 97 | $this->scriptUrl .= rtrim(App::$Properties->get('basePath'), '/'); |
98 | 98 | } |
@@ -104,27 +104,27 @@ discard block |
||
104 | 104 | |
105 | 105 | $this->baseUrlNoLang = $this->baseUrl; |
106 | 106 | if (App::$Request->languageInPath() && App::$Request->getLanguage() !== null) { |
107 | - $this->baseUrl .= '/' . App::$Request->getLanguage(); |
|
107 | + $this->baseUrl .= '/'.App::$Request->getLanguage(); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | // add cron initiation from user if enabled |
111 | 111 | if ((bool)App::$Properties->get('userCron') && env_name === 'Front') { |
112 | - $this->addPlainCode('js', 'if(Math.random() > 0.8) { $.get("' . $this->scriptUrl . '/cron.php?rand=" + Math.random()); }'); |
|
112 | + $this->addPlainCode('js', 'if(Math.random() > 0.8) { $.get("'.$this->scriptUrl.'/cron.php?rand=" + Math.random()); }'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | // build vendor libs alias |
116 | - $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl . '/vendor/bower/jquery/dist/jquery.min.js'; |
|
117 | - $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/css/bootstrap.min.css'; |
|
118 | - $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/js/bootstrap.min.js'; |
|
119 | - $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl . '/vendor/bower/components-font-awesome/css/font-awesome.min.css'; |
|
120 | - $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/jquery-ui.min.js'; |
|
121 | - $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css'; |
|
116 | + $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl.'/vendor/bower/jquery/dist/jquery.min.js'; |
|
117 | + $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/css/bootstrap.min.css'; |
|
118 | + $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/js/bootstrap.min.js'; |
|
119 | + $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl.'/vendor/bower/components-font-awesome/css/font-awesome.min.css'; |
|
120 | + $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/jquery-ui.min.js'; |
|
121 | + $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css'; |
|
122 | 122 | |
123 | 123 | $themeAll = App::$Properties->get('theme'); |
124 | 124 | if (!isset($themeAll[env_name]) || Str::length($themeAll[env_name]) < 1) { |
125 | 125 | $themeAll[env_name] = 'default'; |
126 | 126 | } |
127 | - $this->currentViewUrl = $this->scriptUrl . '/Apps/View/' . env_name . '/' . $themeAll[env_name]; |
|
127 | + $this->currentViewUrl = $this->scriptUrl.'/Apps/View/'.env_name.'/'.$themeAll[env_name]; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } elseif (method_exists($class, $obj)) { // maybe its a function? |
133 | 133 | $class = $class::$obj; // call function |
134 | 134 | } else { |
135 | - throw new SyntaxException('Filter callback execution failed: ' . $filter_name); |
|
135 | + throw new SyntaxException('Filter callback execution failed: '.$filter_name); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | if (method_exists($class, $method)) { |
143 | 143 | $check = @$class::$method($field_value, $filter_argv); |
144 | 144 | } else { |
145 | - throw new SyntaxException('Filter callback execution failed: ' . $filter_name); |
|
145 | + throw new SyntaxException('Filter callback execution failed: '.$filter_name); |
|
146 | 146 | } |
147 | 147 | } elseif (method_exists('Ffcms\Core\Filter\Native', $filter_name)) { // only full namespace\class path based :( |
148 | 148 | if ($filter_argv != null) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $check = Native::$filter_name($field_value); |
152 | 152 | } |
153 | 153 | } else { |
154 | - throw new SyntaxException('Filter "' . $filter_name . '" is not exist'); |
|
154 | + throw new SyntaxException('Filter "'.$filter_name.'" is not exist'); |
|
155 | 155 | } |
156 | 156 | if ($check !== true) { // switch only on fail check. |
157 | 157 | $this->_badAttr[] = $field_name; |
@@ -314,10 +314,10 @@ discard block |
||
314 | 314 | $paramQuery = $this->getFormName(); |
315 | 315 | if (Str::contains('.', $param)) { |
316 | 316 | foreach (explode('.', $param) as $item) { |
317 | - $paramQuery .= '[' . $item . ']'; |
|
317 | + $paramQuery .= '['.$item.']'; |
|
318 | 318 | } |
319 | 319 | } else { |
320 | - $paramQuery .= '[' . $param . ']'; |
|
320 | + $paramQuery .= '['.$param.']'; |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | if ($method === null) { |