@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // check if options is defined |
45 | 45 | $options = $this->properties['options']; |
46 | 46 | if (!Obj::isIterable($options)) { |
47 | - throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable'); |
|
47 | + throw new SyntaxException('Options for field '.self::nohtml($this->name).' is not iterable'); |
|
48 | 48 | } |
49 | 49 | unset($this->properties['options']); |
50 | 50 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->properties['value'] = $opt; |
66 | 66 | // apply structured checkboxes style for each item |
67 | 67 | $build .= App::$View->render('native/form/multi_checkboxes_list', [ |
68 | - 'item' => self::buildSingleTag('input', $this->properties) . self::nohtml($opt) |
|
68 | + 'item' => self::buildSingleTag('input', $this->properties).self::nohtml($opt) |
|
69 | 69 | ]); |
70 | 70 | } |
71 | 71 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | // get options from properties |
42 | 42 | $options = $this->properties['options']; |
43 | 43 | if (!Obj::isIterable($options)) { |
44 | - throw new SyntaxException('Radio field ' . self::nohtml($this->name) . ' have no iterable options'); |
|
44 | + throw new SyntaxException('Radio field '.self::nohtml($this->name).' have no iterable options'); |
|
45 | 45 | } |
46 | 46 | unset($this->properties['options'], $this->properties['value']); |
47 | 47 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $options = $this->properties['options']; |
37 | 37 | $optionsKey = (bool)$this->properties['optionsKey']; |
38 | 38 | if (!Obj::isIterable($options)) { |
39 | - throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not iterable'); |
|
39 | + throw new SyntaxException('Options for field '.self::nohtml($this->name).' is not iterable'); |
|
40 | 40 | } |
41 | 41 | unset($this->properties['options']); |
42 | 42 |
@@ -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 { |
@@ -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 |
@@ -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 |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | // try to load from file |
45 | - $configFile = ucfirst(Str::lowerCase($configName)) . '.php'; |
|
46 | - if (File::exist('/Private/Config/' . $configFile)) { |
|
47 | - $this->data[$configName] = File::inc('/Private/Config/' . $configFile, true); |
|
45 | + $configFile = ucfirst(Str::lowerCase($configName)).'.php'; |
|
46 | + if (File::exist('/Private/Config/'.$configFile)) { |
|
47 | + $this->data[$configName] = File::inc('/Private/Config/'.$configFile, true); |
|
48 | 48 | return true; |
49 | 49 | } |
50 | 50 | |
@@ -141,11 +141,11 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function writeConfig($configFile, array $data) |
143 | 143 | { |
144 | - $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php'; |
|
144 | + $path = '/Private/Config/'.ucfirst(Str::lowerCase($configFile)).'.php'; |
|
145 | 145 | if (!File::exist($path) || !File::writable($path)) { |
146 | 146 | return false; |
147 | 147 | } |
148 | - $saveData = '<?php return ' . Arr::exportVar($data) . ';'; |
|
148 | + $saveData = '<?php return '.Arr::exportVar($data).';'; |
|
149 | 149 | File::write($path, $saveData); |
150 | 150 | // overload config values if changed |
151 | 151 | $this->load($configFile, true); |