diff --git a/ajax/countLang.php b/ajax/countLang.php index 4fd61d00a532f6a12e59a03a2ac4d08bc11708ea..5773db5b3e12b601e182f385a5d456de52cd490a 100644 --- a/ajax/countLang.php +++ b/ajax/countLang.php @@ -12,9 +12,9 @@ QUI::$Ajax->registerFunction( 'package_quiqqer_template-cologne_ajax_countLang', function () { - $Site = QUI::getRewrite()->getSite(); + $Site = QUI::getRewrite()->getSite(); $Project = $Site->getProject(); - return \count($Project->getLanguages()); + return count($Project->getLanguages()); } ); diff --git a/ajax/getLangList.php b/ajax/getLangList.php index 816e28e2479b339ed3eaad7552d48253aa665a82..6a964246bb351dce49e41b5b1c65bda2ceda6619 100644 --- a/ajax/getLangList.php +++ b/ajax/getLangList.php @@ -12,22 +12,21 @@ QUI::$Ajax->registerFunction( 'package_quiqqer_template-cologne_ajax_getLangList', function ($flagFolderPath, $siteId) { - - $Engine = QUI::getTemplateManager()->getEngine(); + $Engine = QUI::getTemplateManager()->getEngine(); $Project = QUI::getRewrite()->getProject(); - $Site = $Project->get($siteId); - $langs = $Project->getLanguages(); + $Site = $Project->get($siteId); + $langs = $Project->getLanguages(); if (count($langs) < 2) { return ''; } $Engine->assign([ - 'Site' => $Site, - 'projectLang' => $Project->getLang(), + 'Site' => $Site, + 'projectLang' => $Project->getLang(), 'DefaultCurrency' => QUI\ERP\Currency\Handler::getDefaultCurrency(), - 'langs' => $langs, - 'path' => $flagFolderPath + 'langs' => $langs, + 'path' => $flagFolderPath ]); return QUI\Output::getInstance()->parse($Engine->fetch(dirname(__FILE__) . '/template/LangList.html')); diff --git a/composer.json b/composer.json index 5681fb5a0020eab8c9100bbe7d7982863f30c343..0c520071e471dca7d75e5ef83c2533e8702e38f6 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "quiqqer\/template-cologne", + "name": "quiqqer/template-cologne", "type": "quiqqer-template", "description": "The QUIQQER Cologne E-Commerce Template", "license": "GPLv3", @@ -7,32 +7,32 @@ { "name": "Henning Leutz", "email": "support@pcsg.de", - "homepage": "http:\/\/www.pcsg.de", + "homepage": "https://www.pcsg.de", "role": "Developer" } ], "support": { "email": "support@pcsg.de", - "url": "http:\/\/www.pcsg.de" + "url": "https://www.pcsg.de" }, "require": { - "php": ">=5.3", - "quiqqer\/quiqqer": "1.*|dev-master|dev-dev", - "quiqqer\/erp": "^1|^2|^3|dev-master|dev-dev", - "quiqqer\/products": "^1.3.1|dev-master|dev-dev", - "quiqqer\/order": "^1.6|dev-master|dev-dev", - "quiqqer\/product-bricks": "1.*|dev-master|dev-dev", - "quiqqer\/frontend-users": "1.*|dev-master|dev-dev", - "quiqqer\/menu": "2.*|dev-master|dev-dev", - "quiqqer\/sitetypes": "1.*|dev-master|dev-dev", - "quiqqer\/unsemantic": "1.*", - "quiqqer-asset\/fastclick": "1.*", - "quiqqer\/tooltips": "1.*|dev-master|dev-dev", - "quiqqer\/currency": ">=1.1|*@dev" + "php": "^8.1", + "quiqqer/core": "^2", + "quiqqer/erp": "^3", + "quiqqer/products": "^2", + "quiqqer/order": "^2", + "quiqqer/product-bricks": "^2", + "quiqqer/frontend-users": "^2", + "quiqqer/menu": "^3", + "quiqqer/sitetypes": "^2", + "quiqqer/unsemantic": "^2", + "quiqqer-asset/fastclick": "^1", + "quiqqer/tooltips": "^2", + "quiqqer/currency": "^2" }, "autoload": { "psr-4": { - "QUI\\TemplateCologne\\": "src\/QUI\/TemplateCologne" + "QUI\\TemplateCologne\\": "src/QUI/TemplateCologne" } } } diff --git a/src/QUI/TemplateCologne/Controls/CurrencySwitch.php b/src/QUI/TemplateCologne/Controls/CurrencySwitch.php index c1c124227cefb29e8912ea7618ff2e31fe323afc..424d15ed59bb9f8361c4091161073e7df355714f 100644 --- a/src/QUI/TemplateCologne/Controls/CurrencySwitch.php +++ b/src/QUI/TemplateCologne/Controls/CurrencySwitch.php @@ -18,7 +18,7 @@ class CurrencySwitch extends QUI\Control * * @param array $attributes */ - public function __construct($attributes = []) + public function __construct(array $attributes = []) { $this->setAttributes([ 'class' => 'quiqqer-currency-switch', @@ -37,7 +37,7 @@ public function __construct($attributes = []) * @see \QUI\Control::create() * */ - public function getBody() + public function getBody(): string { $Engine = QUI::getTemplateManager()->getEngine(); @@ -79,9 +79,8 @@ public function getBody() * Is currency switch allowed? Setting has over currencies number. * * @return bool - * @throws QUI\Exception */ - protected function isCurrencySwitchAllowed() + protected function isCurrencySwitchAllowed(): bool { if (!$this->getAttribute('userRelatedCurrency')) { return false; diff --git a/src/QUI/TemplateCologne/Controls/LangCurrencySwitch.php b/src/QUI/TemplateCologne/Controls/LangCurrencySwitch.php index ef6184e1ccf1a9765e141ecf0ef317dea378feb6..d714bfdbe6ae8bd4ff102d5cc18bbf0c0ee55caa 100644 --- a/src/QUI/TemplateCologne/Controls/LangCurrencySwitch.php +++ b/src/QUI/TemplateCologne/Controls/LangCurrencySwitch.php @@ -18,13 +18,13 @@ class LangCurrencySwitch extends QUI\Control * * @param array $attributes */ - public function __construct($attributes = []) + public function __construct(array $attributes = []) { $this->setAttributes([ - 'class' => 'lang-currency-switch', - 'data-qui' => 'package/quiqqer/template-cologne/bin/javascript/controls/LangCurrencySwitch', + 'class' => 'lang-currency-switch', + 'data-qui' => 'package/quiqqer/template-cologne/bin/javascript/controls/LangCurrencySwitch', 'userRelatedCurrency' => 1, // 1 / 0 -> is user allowed to change currency? - 'flagFolder' => URL_BIN_DIR . '16x16/flags/', + 'flagFolder' => URL_BIN_DIR . '16x16/flags/', ]); $this->addCSSFile(dirname(__FILE__) . '/LangCurrencySwitch.css'); @@ -39,19 +39,15 @@ public function __construct($attributes = []) * @see \QUI\Control::create() * */ - public function getBody() + public function getBody(): string { - $Engine = QUI::getTemplateManager()->getEngine(); - $Site = $this->getSite(); - $Project = $Site->getProject(); - $Locale = QUI::getLocale(); - $flagFolder = $this->getAttribute('flagFolder'); + $Engine = QUI::getTemplateManager()->getEngine(); + $Site = $this->getSite(); + $Project = $Site->getProject(); + $Locale = QUI::getLocale(); + $flagFolder = $this->getAttribute('flagFolder'); $enableChange = false; - if (!$Site) { - return ''; - } - // is user allowed to change currency? $currencySwitch = false; $this->setJavaScriptControlOption('userrelatedcurrency', '0'); @@ -59,7 +55,7 @@ public function getBody() if ($this->isCurrencySwitchAllowed()) { try { $Package = QUI::getPackage('quiqqer/erp'); - $Config = $Package->getConfig(); + $Config = $Package->getConfig(); if ($Config->getValue('general', 'userRelatedCurrency')) { $this->setJavaScriptControlOption('userrelatedcurrency', '1'); @@ -93,13 +89,13 @@ public function getBody() }; $Engine->assign([ - 'this' => $this, - 'projectLang' => $Project->getLang(), - 'currencySwitch' => $currencySwitch, + 'this' => $this, + 'projectLang' => $Project->getLang(), + 'currencySwitch' => $currencySwitch, 'DefaultCurrency' => $Currency, - 'flagFolderPath' => $flagFolder, - 'imgAltText' => $imgAltText, - 'enableChange' => $enableChange + 'flagFolderPath' => $flagFolder, + 'imgAltText' => $imgAltText, + 'enableChange' => $enableChange ]); return $Engine->fetch(dirname(__FILE__) . '/LangCurrencySwitch.html'); @@ -108,10 +104,10 @@ public function getBody() /** * Return the Project * - * @return mixed|QUI\Projects\Site + * @return QUI\Interfaces\Projects\Site * @throws QUI\Exception */ - protected function getSite() + protected function getSite(): QUI\Interfaces\Projects\Site { if ($this->getAttribute('Site')) { return $this->getAttribute('Site'); @@ -124,11 +120,9 @@ protected function getSite() * Is currency switch allowed? Setting has over currencies number. * * @return bool - * @throws QUI\Exception */ - protected function isCurrencySwitchAllowed() + protected function isCurrencySwitchAllowed(): bool { - if (!$this->getAttribute('userRelatedCurrency')) { return false; } diff --git a/src/QUI/TemplateCologne/Controls/LoginAndRegister.php b/src/QUI/TemplateCologne/Controls/LoginAndRegister.php index 38aee3c5c33385afd8154e982e4640ad1d9ca6f3..4a626edf97d65f408c811c8b0163afd3abf0c3a0 100644 --- a/src/QUI/TemplateCologne/Controls/LoginAndRegister.php +++ b/src/QUI/TemplateCologne/Controls/LoginAndRegister.php @@ -18,11 +18,11 @@ class LoginAndRegister extends QUI\Control * * @param array $attributes */ - public function __construct($attributes = []) + public function __construct(array $attributes = []) { $this->setAttributes([ 'nodeName' => 'section', - 'class' => 'loginAndRegister' + 'class' => 'loginAndRegister' ]); $this->addCSSFile(dirname(__FILE__) . '/LoginAndRegister.css'); @@ -31,18 +31,14 @@ public function __construct($attributes = []) } /** - * (non-PHPdoc) - * - * @throws QUI\Exception - * @see \QUI\Control::create() - * + * @return string */ - public function getBody() + public function getBody(): string { $Engine = QUI::getTemplateManager()->getEngine(); $Login = new QUI\FrontendUsers\Controls\Login([ - 'header' => true, + 'header' => true, 'passwordReset' => true ]); @@ -51,7 +47,7 @@ public function getBody() ]); $Engine->assign([ - 'Login' => $Login, + 'Login' => $Login, 'Registration' => $Registration ]); diff --git a/src/QUI/TemplateCologne/Controls/Menu/Categories.php b/src/QUI/TemplateCologne/Controls/Menu/Categories.php index 53885961b9d14550db30b57d4589fd377071be79..eadc91cc168a063974d3fb9c43f8414610144ae3 100644 --- a/src/QUI/TemplateCologne/Controls/Menu/Categories.php +++ b/src/QUI/TemplateCologne/Controls/Menu/Categories.php @@ -3,17 +3,22 @@ /** * This file contains QUI\TemplateCologne\Controls\Menu\Categories * - * Creates an "slide out" menu with product categories. + * Creates a "slide out" menu with product categories. * * @author www.pcsg.de (Michael Danielczok) */ namespace QUI\TemplateCologne\Controls\Menu; +use Exception; use QUI; use QUI\Menu\EventHandler; use QUI\Projects\Site\Utils; +use function dirname; +use function md5; +use function serialize; + /** * Class Categories */ @@ -24,28 +29,28 @@ class Categories extends QUI\Control * * @param array $attributes */ - public function __construct($attributes = []) + public function __construct(array $attributes = []) { $this->setAttributes([ 'class' => 'quiqqer-categories-menu', 'startId' => 1, // site id or site link where menu starts by. 1 is start page (first project page) - 'template' => \dirname(__FILE__) . '/Categories.html', // nav wrapper - 'menuFile' => \dirname(__FILE__) . '/Categories.Menu.html', // contains children (sites), + 'template' => dirname(__FILE__) . '/Categories.html', // nav wrapper + 'menuFile' => dirname(__FILE__) . '/Categories.Menu.html', // contains children (sites), 'jsControl' => 'package/quiqqer/template-cologne/bin/javascript/controls/Menu/Categories', 'showDescFor' => 'all', // Show category description: all / firstLevel / none 'showBasketButton' => false ]); - $this->addCSSFile(\dirname(__FILE__) . '/Categories.css'); + $this->addCSSFile(dirname(__FILE__) . '/Categories.css'); parent::__construct($attributes); } /** * @return string - * @throws QUI\Exception + * @throws QUI\Exception|Exception */ - public function getBody() + public function getBody(): string { $Engine = QUI::getTemplateManager()->getEngine(); $Project = $this->getProject(); @@ -68,14 +73,14 @@ public function getBody() $cache = EventHandler::menuCacheName() . '/megaMenu/'; - $cache .= \md5( + $cache .= md5( $this->getSite()->getCachePath() . - \serialize($this->getAttributes()) + serialize($this->getAttributes()) ); try { return QUI\Cache\Manager::get($cache); - } catch (QUI\Exception $Exception) { + } catch (QUI\Exception) { } $showBasketButton = $this->getAttribute('showBasketButton'); @@ -103,9 +108,10 @@ public function getBody() /** * Return the current site * - * @return mixed|QUI\Projects\Site + * @return QUI\Interfaces\Projects\Site + * @throws QUI\Exception */ - protected function getSite() + protected function getSite(): QUI\Interfaces\Projects\Site { if ($this->getAttribute('Site')) { return $this->getAttribute('Site'); diff --git a/src/QUI/TemplateCologne/Controls/Payments.php b/src/QUI/TemplateCologne/Controls/Payments.php index 96d6e7834dfedf088a4756a79d10caf303fbad88..2c9c6992ad036d723e0a4c79c6717bffe0411fa1 100644 --- a/src/QUI/TemplateCologne/Controls/Payments.php +++ b/src/QUI/TemplateCologne/Controls/Payments.php @@ -13,6 +13,9 @@ use QUI; +use function class_exists; +use function file_exists; + /** * Class Payments */ @@ -23,7 +26,7 @@ class Payments extends QUI\Control * * @param array $attributes */ - public function __construct($attributes = []) + public function __construct(array $attributes = []) { $this->setAttributes([ 'class' => 'quiqqer-payments-control', @@ -39,20 +42,16 @@ public function __construct($attributes = []) } /** - * (non-PHPdoc) - * - * @throws QUI\Exception - * @see \QUI\Control::create() - * + * @return string */ - public function getBody() + public function getBody(): string { - if (!\class_exists('\QUI\ERP\Accounting\Payments\Payments')) { + if (!class_exists('\QUI\ERP\Accounting\Payments\Payments')) { return ''; } $Engine = QUI::getTemplateManager()->getEngine(); - $Payments = \QUI\ERP\Accounting\Payments\Payments::getInstance(); + $Payments = QUI\ERP\Accounting\Payments\Payments::getInstance(); $payments = $Payments->getpayments(); if (count($payments) < 1) { @@ -70,8 +69,8 @@ public function getBody() $customTemplate = $this->getAttribute('customTemplate'); $customCss = $this->getAttribute('customCss'); - if ($customTemplate && \file_exists($customTemplate)) { - if ($customCss && \file_exists($customCss)) { + if ($customTemplate && file_exists($customTemplate)) { + if ($customCss && file_exists($customCss)) { $this->addCSSFile($this->getAttribute('customCss')); } diff --git a/src/QUI/TemplateCologne/Controls/ProductGallery.php b/src/QUI/TemplateCologne/Controls/ProductGallery.php index 8a7386096c59739e2955f2e375f3fe333639fe81..9fbc92362cadc3f85172904d28fd9bca5dc13f92 100644 --- a/src/QUI/TemplateCologne/Controls/ProductGallery.php +++ b/src/QUI/TemplateCologne/Controls/ProductGallery.php @@ -6,6 +6,7 @@ namespace QUI\TemplateCologne\Controls; +use Exception; use QUI; use QUI\ERP\Products\Handler\Fields; @@ -22,7 +23,7 @@ class ProductGallery extends QUI\Control * * @param array $attributes */ - public function __construct($attributes = []) + public function __construct(array $attributes = []) { $this->setAttributes([ 'Product' => false @@ -32,13 +33,10 @@ public function __construct($attributes = []) } /** - * (non-PHPdoc) - * - * @throws QUI\Exception - * @see \QUI\Control::create() - * + * @return string + * @throws Exception */ - public function getBody() + public function getBody(): string { if (!$this->getAttribute('Product')) { return ''; @@ -69,7 +67,7 @@ public function getBody() try { $Gallery->setAttribute('folderId', $Product->getFieldValue(Fields::FIELD_FOLDER)); - } catch (QUI\Exception $Exception) { + } catch (QUI\Exception) { } if ($typeVariantParent || $typeVariantChild) { @@ -132,7 +130,7 @@ protected function getVariantImages(QUI\ERP\Products\Product\Product $Product): if (!$hasMainImage) { $images[] = $MainImage; } - } catch (\Exception $Exception) { + } catch (Exception $Exception) { QUI\System\Log::writeDebugException($Exception); $mainImageId = false; } diff --git a/src/QUI/TemplateCologne/Controls/SimpleUserInfo.php b/src/QUI/TemplateCologne/Controls/SimpleUserInfo.php index f33ce894d3b7de0fd042087039c1c020c4d5cb34..fd57a1252c6ed3b24fcb234b897e94d274650ad9 100644 --- a/src/QUI/TemplateCologne/Controls/SimpleUserInfo.php +++ b/src/QUI/TemplateCologne/Controls/SimpleUserInfo.php @@ -7,6 +7,7 @@ namespace QUI\TemplateCologne\Controls; use QUI; +use QUI\Database\Exception; /** * Class ProductGallery @@ -18,7 +19,7 @@ class SimpleUserInfo extends QUI\Control * * @param array $attributes */ - public function __construct($attributes = []) + public function __construct(array $attributes = []) { $this->setAttributes([ 'User' => null @@ -35,7 +36,7 @@ public function __construct($attributes = []) * @throws QUI\Exception * @see \QUI\Control::create() */ - public function getBody() + public function getBody(): string { $Engine = QUI::getTemplateManager()->getEngine(); $User = $this->getUser(); @@ -62,7 +63,7 @@ public function getBody() * @return QUI\Interfaces\Users\User * @throws QUI\FrontendUsers\Exception */ - public function getUser() + public function getUser(): QUI\Interfaces\Users\User { $User = $this->getAttribute('User'); @@ -83,10 +84,10 @@ public function getUser() /** * Return the current site * - * @return QUI\Projects\Site + * @return QUI\Interfaces\Projects\Site * @throws QUI\Exception */ - public function getSite() + public function getSite(): QUI\Interfaces\Projects\Site { if ($this->getAttribute('Site')) { return $this->getAttribute('Site'); @@ -101,8 +102,9 @@ public function getSite() * @param $User QUI\Interfaces\Users\User * * @return int + * @throws Exception */ - public function getOrdersNumber($User) + public function getOrdersNumber(QUI\Interfaces\Users\User $User): int { $Orders = QUI\ERP\Order\Handler::getInstance(); diff --git a/src/QUI/TemplateCologne/EventHandler.php b/src/QUI/TemplateCologne/EventHandler.php index 17c1f0102a1b76af1df5fa343f26293450d101d9..f34b098703a955a3a6216b818ef4a37440793d26 100644 --- a/src/QUI/TemplateCologne/EventHandler.php +++ b/src/QUI/TemplateCologne/EventHandler.php @@ -7,6 +7,8 @@ namespace QUI\TemplateCologne; use QUI; +use QUI\ERP\Products\Product\ViewFrontend; +use QUI\Smarty\Collector; /** * Event Class @@ -20,13 +22,9 @@ class EventHandler * * @return void */ - public static function onProjectConfigSave() + public static function onProjectConfigSave(): void { - try { - QUI\Cache\Manager::clear('quiqqer/templateCologne'); - } catch (QUI\Exception $Exception) { - QUI\System\Log::writeException($Exception); - } + QUI\Cache\Manager::clear('quiqqer/templateCologne'); } /** @@ -34,25 +32,21 @@ public static function onProjectConfigSave() * * @return void */ - public static function onSiteSave() + public static function onSiteSave(): void { - try { - QUI\Cache\Manager::clear('quiqqer/templateCologne'); - } catch (QUI\Exception $Exception) { - QUI\System\Log::writeException($Exception); - } + QUI\Cache\Manager::clear('quiqqer/templateCologne'); } /** - * @param \Quiqqer\Engine\Collector $Collector - * @param QUI\ERP\Products\Product\ViewFrontend $Product + * @param Collector $Collector + * @param ViewFrontend $Product * * @throws QUI\Exception */ public static function onQuiqqerProductsProductButtonsEnd( - \Quiqqer\Engine\Collector $Collector, - \QUI\ERP\Products\Product\ViewFrontend $Product - ) { + QUI\Smarty\Collector $Collector, + ViewFrontend $Product + ): void { // setting $Project = QUI::getRewrite()->getProject(); diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index 81475da826351dffeea5bbc754767cf453ff48b5..f0fc42ba72615cb104959ad084175c380d9f88c2 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -7,8 +7,16 @@ namespace QUI\TemplateCologne; use QUI; +use QUI\Database\Exception; use QUI\ERP\Shipping\Shipping; use QUI\ERP\StockManagement\StockManager; +use QUI\Projects\Project; +use QUI\Projects\Site; +use QUI\TemplateCologne\Controls\Payments; + +use function class_exists; +use function count; +use function method_exists; /** * Class Utils @@ -24,7 +32,7 @@ class Utils * @throws QUI\Exception * */ - public static function getAvatar($User) + public static function getAvatar(mixed $User): QUI\Projects\Media\Image|bool { if (!$User instanceof QUI\Interfaces\Users\User) { throw new QUI\Exception([ @@ -38,7 +46,7 @@ public static function getAvatar($User) $result = QUI::getEvents()->fireEvent('userGetAvatar', [$User]); foreach ($result as $Entry) { - if ($Entry instanceof QUI\Interfaces\Projects\Media\File) { + if ($Entry instanceof QUI\Projects\Media\Image) { return $Entry; } } @@ -51,7 +59,7 @@ public static function getAvatar($User) try { return QUI\Projects\Media\Utils::getImageByUrl($avatar); - } catch (QUI\Exception $Exception) { + } catch (QUI\Exception) { } return false; @@ -60,17 +68,17 @@ public static function getAvatar($User) /** * Returns config. If a cache exists, it will be returned. * - * @param $params + * @param array $params * * @return array|bool|object|string * @throws QUI\Exception */ - public static function getConfig($params) + public static function getConfig(array $params): object|array|bool|string { - /** @var $Site \QUI\Projects\Site */ + /** @var $Site Site */ $Site = $params['Site']; - /* @var $Project QUI\Projects\Project */ + /* @var $Project Project */ $Project = $params['Project']; /* @var $Project QUI\Template */ @@ -370,11 +378,12 @@ public static function getConfig($params) /** * Returns data for predefined footer if enabled. * - * @param \QUI\Projects\Project $Project + * @param Project $Project * * @return array - data for predefined footer + * @throws Exception */ - private static function getPredefinedFooter($Project) + private static function getPredefinedFooter(Project $Project): array { $lang = $Project->getLang(); @@ -552,9 +561,9 @@ private static function getPredefinedFooter($Project) if ( $Project->getConfig('templateCologne.settings.predefinedFooter.payments') - && \class_exists('\QUI\ERP\Accounting\Payments\Payments') + && class_exists('\QUI\ERP\Accounting\Payments\Payments') ) { - $PaymentsControl = new \QUI\TemplateCologne\Controls\Payments([ + $PaymentsControl = new Payments([ 'template' => $Project->getConfig('templateCologne.settings.predefinedFooter.payments.layout') ]); @@ -662,7 +671,7 @@ public static function getStockFrontendView(int $productId) /** @var QUI\ERP\StockManagement\Products\Fields\StockView $StockView */ $StockView = $StockField->getFrontendView(); - if (\method_exists($StockView, 'setProduct')) { + if (method_exists($StockView, 'setProduct')) { $StockView->setProduct($Product); } @@ -676,9 +685,9 @@ public static function getStockFrontendView(int $productId) * * @return string */ - public static function convertBrickCSSClass(array $classes) + public static function convertBrickCSSClass(array $classes): string { - if (\count($classes) < 1) { + if (count($classes) < 1) { return ''; }