@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * String html tags and escape quotes |
51 | 51 | * @param string|array $html |
52 | 52 | * @param boolean $escapeQuotes |
53 | - * @return string|array|null |
|
53 | + * @return string|null |
|
54 | 54 | */ |
55 | 55 | public function strip_tags($html, $escapeQuotes = true) |
56 | 56 | { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @deprecated |
91 | 91 | * @param $var |
92 | 92 | * @param null $indent |
93 | - * @return mixed|string |
|
93 | + * @return string|null |
|
94 | 94 | */ |
95 | 95 | public function var_export54($var, $indent = null, $guessTypes = false) { |
96 | 96 | return Arr::exportVar($var, $indent, $guessTypes); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function __construct() |
23 | 23 | { |
24 | 24 | $config = \HTMLPurifier_Config::createDefault(); |
25 | - $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/'); |
|
25 | + $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/'); |
|
26 | 26 | $config->set('HTML.Allowed', 'p,b,strong,em,a[href],i,span,ul,ol,li,blockquote,h2,h3,pre,code,img[src|alt|width|height]'); |
27 | 27 | //$config->set('URI.Base', 'http://www.example.com'); |
28 | 28 | //$config->set('URI.MakeAbsolute', true); |
@@ -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 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | // check if cache is enabled |
43 | 43 | if (App::$Cache !== null) { |
44 | 44 | // try to get bootable class map from cache, or initialize parsing |
45 | - $cache = App::$Cache->getItem('boot.' . env_name . '.class.map'); |
|
45 | + $cache = App::$Cache->getItem('boot.'.env_name.'.class.map'); |
|
46 | 46 | if (!$cache->isHit()) { |
47 | 47 | $this->compileBootableClasses(); |
48 | 48 | $cache->set($this->objects)->expiresAfter(static::CACHE_TREE_TIME); |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | { |
98 | 98 | // list app root's |
99 | 99 | foreach ($this->appRoots as $app) { |
100 | - $app .= '/Apps/Controller/' . env_name; |
|
100 | + $app .= '/Apps/Controller/'.env_name; |
|
101 | 101 | $files = File::listFiles($app, ['.php'], true); |
102 | 102 | foreach ($files as $file) { |
103 | 103 | // define full class name with namespace |
104 | - $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file); |
|
104 | + $class = 'Apps\Controller\\'.env_name.'\\'.Str::cleanExtension($file); |
|
105 | 105 | // check if class exists (must be loaded over autoloader), boot method exist and this is controller instanceof |
106 | 106 | if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Controller', true)) { |
107 | 107 | $this->objects[] = $class; |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | |
112 | 112 | // list widget root's |
113 | 113 | foreach ($this->widgetRoots as $widget) { |
114 | - $widget .= '/Widgets/' . env_name; |
|
114 | + $widget .= '/Widgets/'.env_name; |
|
115 | 115 | // widgets are packed in directory, classname should be the same with root directory name |
116 | 116 | $dirs = Directory::scan($widget, GLOB_ONLYDIR, true); |
117 | 117 | if (!Obj::isArray($dirs)) { |
118 | 118 | continue; |
119 | 119 | } |
120 | 120 | foreach ($dirs as $instance) { |
121 | - $class = 'Widgets\\' . env_name . '\\' . $instance . '\\' . $instance; |
|
121 | + $class = 'Widgets\\'.env_name.'\\'.$instance.'\\'.$instance; |
|
122 | 122 | if (class_exists($class) && method_exists($class, 'boot') && is_a($class, 'Ffcms\Core\Arch\Widget', true)) { |
123 | 123 | $this->objects[] = $class; |
124 | 124 | } |
@@ -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 |