diff --git a/app/Libraries/AssetsLoader.php b/app/Libraries/AssetsLoader.php index 33a024d..ba2b812 100644 --- a/app/Libraries/AssetsLoader.php +++ b/app/Libraries/AssetsLoader.php @@ -1,7 +1,5 @@ '', - 'keywords' => [], - 'author' => '', - 'viewport' => 'width=device-width, initial-scale=1, shrink-to-fit=no', + 'keywords' => [], + 'author' => '', + 'viewport' => 'width=device-width, initial-scale=1, shrink-to-fit=no', - 'http-equiv' => [], - 'property' => [] + 'http-equiv' => [], + 'property' => [] ]; /** @@ -305,25 +310,25 @@ protected function __header() { $str = doctype($this->doctype) . ''; - if (empty($this->_metaFilterName($this->meta)) === false) + if (empty($meta = $this->_metaFilterName($this->meta)) === false) { - foreach ($this->_metaFilterName($this->meta) as $name => $value) + foreach ($meta as $name => $value) { $str .= $this->_metaTagGenerator($name, $value); } } - if (empty($this->meta['http-equiv']) === false) + if (empty($meta = $this->meta['http-equiv']) === false) { - foreach ($this->meta['http-equiv'] as $name => $value) + foreach ($meta as $name => $value) { $str .= $this->_metaTagGenerator($name, $value, 'http-equiv'); } } - if (empty($this->meta['property']) === false) + if (empty($meta = $this->meta['property']) === false) { - foreach ($this->meta['property'] as $name => $value) + foreach ($meta as $name => $value) { $str .= $this->_metaTagGenerator($name, $value, 'property'); } @@ -331,11 +336,11 @@ protected function __header() $str .= link_tag($this->favicon, 'icon', mime_content_type(basename($this->favicon))); - if (empty($this->css) === false) + if (empty($css = $this->css) === false) { - for ($i = 0; $i < count($this->css); $i++) + for ($i = 0; $i < count($css); $i++) { - $str .= link_tag($this->css[$i]); + $str .= link_tag($css[$i]); } } @@ -344,11 +349,11 @@ protected function __header() $str .= script_tag($this->jquery); } - if (empty($this->js) === false) + if (empty($js = $this->js) === false) { - for ($i = 0; $i < count($this->js); $i++) + for ($i = 0; $i < count($js); $i++) { - $str .= script_tag($this->js[$i]); + $str .= script_tag($js[$i]); } } @@ -444,8 +449,8 @@ protected function _metaFilterName(array $meta = []) */ public function body(array $config = []) { - $this->attributes = $config['attributes'] ?? $this->attributes; - $this->preload = $config['preload'] ?? $this->preload; + $this->attributes = $config['attributes'] ?? $this->attributes; + $this->preload = $config['preload'] ?? $this->preload; $this->cookieBannerURI = $config['cookieBannerURI'] ?? $this->cookieBannerURI; } @@ -456,11 +461,11 @@ public function body(array $config = []) */ public function html(array $config = []) { - $this->doctype = $config['doctype'] ?? $this->doctype; - $this->charset = $config['charset'] ?? $this->charset; + $this->doctype = $config['doctype'] ?? $this->doctype; + $this->charset = $config['charset'] ?? $this->charset; $this->language = $config['language'] ?? $this->language; - $this->title = $config['title'] ?? $this->title; - $this->favicon = $config['favicon'] ?? $this->favicon; + $this->title = $config['title'] ?? $this->title; + $this->favicon = $config['favicon'] ?? $this->favicon; } /**