@@ -35,7 +35,7 @@ |
||
35 | 35 | $options = $this->properties['options']; |
36 | 36 | unset($this->properties['options']); |
37 | 37 | if (!Obj::isIterable($options)) { |
38 | - throw new SyntaxException('Select field ' . self::nohtml($this->name) . ' have no iterable options'); |
|
38 | + throw new SyntaxException('Select field '.self::nohtml($this->name).' have no iterable options'); |
|
39 | 39 | } |
40 | 40 | // value is not used there |
41 | 41 | unset($this->properties['value']); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | // check if class exist |
27 | 27 | if (!class_exists(self::$class)) { |
28 | - return 'Error: Widget is not founded: ' . self::$class; |
|
28 | + return 'Error: Widget is not founded: '.self::$class; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | // init class and pass properties |
@@ -210,7 +210,7 @@ |
||
210 | 210 | /** |
211 | 211 | * Get file md5 hash |
212 | 212 | * @param string $path |
213 | - * @return bool|string |
|
213 | + * @return false|string |
|
214 | 214 | */ |
215 | 215 | public static function getMd5($path) |
216 | 216 | { |
@@ -192,15 +192,15 @@ |
||
192 | 192 | return []; |
193 | 193 | } |
194 | 194 | |
195 | - $dir = opendir($path . '/.'); |
|
195 | + $dir = opendir($path.'/.'); |
|
196 | 196 | while ($item = readdir($dir)) { |
197 | - if (is_file($sub = $path . '/' . $item)) { |
|
197 | + if (is_file($sub = $path.'/'.$item)) { |
|
198 | 198 | $item_ext = Str::lastIn($item, '.'); |
199 | 199 | if ($ext === null || Arr::in($item_ext, $ext)) { |
200 | 200 | if ($returnRelative) { |
201 | 201 | $files[] = $item; |
202 | 202 | } else { |
203 | - $files[] = $path . DIRECTORY_SEPARATOR . $item; |
|
203 | + $files[] = $path.DIRECTORY_SEPARATOR.$item; |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 | } else { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } elseif (method_exists($class, $obj)) { // maybe its a function? |
139 | 139 | $class = $class::$obj; // call function |
140 | 140 | } else { |
141 | - throw new SyntaxException('Filter callback execution failed: ' . $filterName); |
|
141 | + throw new SyntaxException('Filter callback execution failed: '.$filterName); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | if (method_exists($class, $method)) { |
149 | 149 | $check = @$class::$method($fieldValue, $filterArgs); |
150 | 150 | } else { |
151 | - throw new SyntaxException('Filter callback execution failed: ' . $filterName); |
|
151 | + throw new SyntaxException('Filter callback execution failed: '.$filterName); |
|
152 | 152 | } |
153 | 153 | } elseif (method_exists('Ffcms\Core\Helper\ModelFilters', $filterName)) { // only full namespace\class path based :( |
154 | 154 | if ($filterArgs != null) { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $check = ModelFilters::$filterName($fieldValue); |
158 | 158 | } |
159 | 159 | } else { |
160 | - throw new SyntaxException('Filter "' . $filterName . '" is not exist'); |
|
160 | + throw new SyntaxException('Filter "'.$filterName.'" is not exist'); |
|
161 | 161 | } |
162 | 162 | if ($check !== true) { // switch only on fail check. |
163 | 163 | $this->_badAttr[] = $propertyName; |
@@ -323,10 +323,10 @@ discard block |
||
323 | 323 | $paramQuery = $this->getFormName(); |
324 | 324 | if (Str::contains('.', $param)) { |
325 | 325 | foreach (explode('.', $param) as $item) { |
326 | - $paramQuery .= '[' . $item . ']'; |
|
326 | + $paramQuery .= '['.$item.']'; |
|
327 | 327 | } |
328 | 328 | } else { |
329 | - $paramQuery .= '[' . $param . ']'; |
|
329 | + $paramQuery .= '['.$param.']'; |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | if ($method === null) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | continue; |
73 | 73 | } |
74 | 74 | // check initialize conditions (equals to $exist) |
75 | - if (File::exist($this->dir . '/' . $migration)) { |
|
75 | + if (File::exist($this->dir.'/'.$migration)) { |
|
76 | 76 | if (Arr::in($fullName, $dbmigrations) === $exist) { |
77 | 77 | $found[] = $migration; |
78 | 78 | } |
@@ -102,17 +102,17 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | // check if migration file is exists |
105 | - if (!File::exist($this->dir . '/' . $file)) { |
|
105 | + if (!File::exist($this->dir.'/'.$file)) { |
|
106 | 106 | return false; |
107 | 107 | } |
108 | 108 | |
109 | 109 | // check if migration file located in extend directory and copy to default |
110 | 110 | if (Normalize::diskFullPath($this->dir) !== Normalize::diskFullPath(static::DEFAULT_DIR)) { |
111 | - File::copy($this->dir . DIRECTORY_SEPARATOR . $file, static::DEFAULT_DIR . DIRECTORY_SEPARATOR . $file); |
|
111 | + File::copy($this->dir.DIRECTORY_SEPARATOR.$file, static::DEFAULT_DIR.DIRECTORY_SEPARATOR.$file); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | // include migration and get class name |
115 | - File::inc($this->dir . '/' . $file, false, false); |
|
115 | + File::inc($this->dir.'/'.$file, false, false); |
|
116 | 116 | $fullName = Str::cleanExtension($file); |
117 | 117 | $class = Str::firstIn($fullName, '-'); |
118 | 118 | |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | // check if exists |
151 | - if (!File::exist($this->dir . '/' . $file)) { |
|
151 | + if (!File::exist($this->dir.'/'.$file)) { |
|
152 | 152 | return false; |
153 | 153 | } |
154 | 154 | |
155 | - File::inc($this->dir . '/' . $file, false, false); |
|
155 | + File::inc($this->dir.'/'.$file, false, false); |
|
156 | 156 | $fullName = Str::cleanExtension($file); |
157 | 157 | $class = Str::firstIn($fullName, '-'); |
158 | 158 |
@@ -91,7 +91,7 @@ |
||
91 | 91 | /** |
92 | 92 | * Serialize value |
93 | 93 | * @param $value |
94 | - * @return Serialize |
|
94 | + * @return string |
|
95 | 95 | */ |
96 | 96 | public function asSerialize($value) |
97 | 97 | { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | { |
46 | 46 | // check if properties is passed well |
47 | 47 | if ($properties !== null && !Obj::isArray($properties)) { |
48 | - throw new SyntaxException('Property must be passed as array or null! Field: ' . $name); |
|
48 | + throw new SyntaxException('Property must be passed as array or null! Field: '.$name); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | // add properties to autovalidation by js (properties passed by ref) |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | |
99 | 99 | // if field is unknown type add notification in debugbar |
100 | 100 | if (App::$Debug !== null) { |
101 | - App::$Debug->addMessage('Field with name [' . App::$Security->strip_tags($name) . '] have unknown type [' . $this->type . ']', 'error'); |
|
101 | + App::$Debug->addMessage('Field with name ['.App::$Security->strip_tags($name).'] have unknown type ['.$this->type.']', 'error'); |
|
102 | 102 | } |
103 | - return 'No data: ' . App::$Security->strip_tags($name); |
|
103 | + return 'No data: '.App::$Security->strip_tags($name); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -147,12 +147,12 @@ discard block |
||
147 | 147 | if (Str::contains('.', $name)) { |
148 | 148 | $splitedName = explode('.', $name); |
149 | 149 | foreach ($splitedName as $nameKey) { |
150 | - $properties['name'] .= '[' . $nameKey . ']'; |
|
151 | - $properties['id'] .= '-' . $nameKey; |
|
150 | + $properties['name'] .= '['.$nameKey.']'; |
|
151 | + $properties['id'] .= '-'.$nameKey; |
|
152 | 152 | } |
153 | 153 | } else { // standard property definition - add field name |
154 | - $properties['name'] .= '[' . $name . ']'; |
|
155 | - $properties['id'] .= '-' . $name; |
|
154 | + $properties['name'] .= '['.$name.']'; |
|
155 | + $properties['id'] .= '-'.$name; |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | } |
159 | 159 | \ No newline at end of file |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $purifier = App::$Memory->get('object.purifier.helpers'); |
24 | 24 | } else { |
25 | 25 | $config = \HTMLPurifier_Config::createDefault(); |
26 | - $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/'); |
|
26 | + $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/'); |
|
27 | 27 | $config->set('AutoFormat.AutoParagraph', false); |
28 | 28 | |
29 | 29 | // allow use target=_blank for links |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | $build = null; |
66 | 66 | foreach ($property as $p => $v) { |
67 | 67 | if ($v === null || $v === false || $v === true) { |
68 | - $build .= ' ' . self::nohtml($p); |
|
68 | + $build .= ' '.self::nohtml($p); |
|
69 | 69 | } else { |
70 | - $build .= ' ' . self::nohtml($p) . '="' . self::nohtml($v) . '"'; |
|
70 | + $build .= ' '.self::nohtml($p).'="'.self::nohtml($v).'"'; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | return $build; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public static function buildSingleTag($tagName, array $property = null, $closeSlash = true) |
84 | 84 | { |
85 | - return '<' . self::nohtml($tagName) . self::applyProperty($property) . ($closeSlash ? '/>' : '>'); |
|
85 | + return '<'.self::nohtml($tagName).self::applyProperty($property).($closeSlash ? '/>' : '>'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $value = self::nohtml($value); |
101 | 101 | } |
102 | 102 | |
103 | - return '<' . $tagName . self::applyProperty($property) . '>' . $value . '</' . $tagName . '>'; |
|
103 | + return '<'.$tagName.self::applyProperty($property).'>'.$value.'</'.$tagName.'>'; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | if (!Str::contains('/', $elementPoint) || count($elementArray) < 2) { |
143 | 143 | $active = $elementPoint === $currentPoint; |
144 | 144 | } else { |
145 | - $elementPoint = $elementArray[0] . '/' . $elementArray[1]; |
|
145 | + $elementPoint = $elementArray[0].'/'.$elementArray[1]; |
|
146 | 146 | $active = Str::startsWith($elementPoint, $currentPoint); |
147 | 147 | } |
148 | 148 | break; |
149 | 149 | case 'id': |
150 | 150 | $elementArray = explode('/', $elementPoint); |
151 | - $elementPoint = $elementArray[0] . '/' . $elementArray[1]; |
|
151 | + $elementPoint = $elementArray[0].'/'.$elementArray[1]; |
|
152 | 152 | if ($elementArray[2] === null) { // looks like id is not defined in element |
153 | 153 | if (Str::contains('?', $currentPoint)) { |
154 | 154 | $currentPoint = Str::firstIn($currentPoint, '?'); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $currentToId = implode('/', array_slice($currentArray, 0, 3)); |
158 | 158 | $active = $elementPoint === $currentToId; |
159 | 159 | } else { |
160 | - $elementPoint .= '/' . $elementArray[2]; |
|
160 | + $elementPoint .= '/'.$elementArray[2]; |
|
161 | 161 | $active = Str::startsWith($elementPoint, $currentPoint); |
162 | 162 | } |
163 | 163 | break; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | */ |
213 | 213 | public static function convertLink($uri) |
214 | 214 | { |
215 | - $link = App::$Alias->baseUrl . '/'; |
|
215 | + $link = App::$Alias->baseUrl.'/'; |
|
216 | 216 | if (Obj::isArray($uri)) { |
217 | 217 | $link .= Url::buildPathway($uri); |
218 | 218 | } elseif (Str::startsWith('http', $uri)) { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | try { |
178 | 178 | /** @var \Ffcms\Core\Arch\Controller $callClass */ |
179 | 179 | $callClass = null; |
180 | - $callMethod = 'action' . self::$Request->getAction(); |
|
180 | + $callMethod = 'action'.self::$Request->getAction(); |
|
181 | 181 | |
182 | 182 | // founded callback injection alias |
183 | 183 | if (self::$Request->getCallbackAlias() !== false) { |
@@ -185,16 +185,16 @@ discard block |
||
185 | 185 | if (class_exists($cName)) { |
186 | 186 | $callClass = new $cName; |
187 | 187 | } else { |
188 | - throw new NotFoundException('Callback alias of class "' . App::$Security->strip_tags($cName) . '" is not founded'); |
|
188 | + throw new NotFoundException('Callback alias of class "'.App::$Security->strip_tags($cName).'" is not founded'); |
|
189 | 189 | } |
190 | 190 | } else { // typical parsing of native apps |
191 | - $cName = '\Apps\Controller\\' . env_name . '\\' . self::$Request->getController(); |
|
191 | + $cName = '\Apps\Controller\\'.env_name.'\\'.self::$Request->getController(); |
|
192 | 192 | |
193 | 193 | // try to initialize class object |
194 | 194 | if (class_exists($cName)) { |
195 | 195 | $callClass = new $cName; |
196 | 196 | } else { |
197 | - throw new NotFoundException('Application can not be runned. Initialized class not founded: ' . App::$Security->strip_tags($cName)); |
|
197 | + throw new NotFoundException('Application can not be runned. Initialized class not founded: '.App::$Security->strip_tags($cName)); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | // build full compiled output html data |
239 | 239 | $html = $callClass->buildOutput(); |
240 | 240 | } else { |
241 | - throw new NotFoundException('Method "' . App::$Security->strip_tags($callMethod) . '()" not founded in "' . get_class($callClass) . '"'); |
|
241 | + throw new NotFoundException('Method "'.App::$Security->strip_tags($callMethod).'()" not founded in "'.get_class($callClass).'"'); |
|
242 | 242 | } |
243 | 243 | } catch (NotFoundException $e) { // catch exceptions and set output |
244 | 244 | $html = $e->display(); |