From ba2727e0f06547e82adb5679eb6fefcf8d150104 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Fri, 20 Nov 2020 22:52:39 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Breadcrumbs.php | 9 +- src/Dropdown.php | 14 +-- src/Menu.php | 20 ++-- src/Message.php | 2 +- src/Nav.php | 18 ++-- src/NavBar.php | 6 +- src/Widget.php | 4 +- tests/BreadcrumbsTest.php | 12 +-- tests/MenuTest.php | 188 +++++++++++++++++++------------------- tests/MessageTest.php | 2 - tests/NavTest.php | 35 ++++--- tests/TestCase.php | 16 ++-- 12 files changed, 159 insertions(+), 167 deletions(-) diff --git a/src/Breadcrumbs.php b/src/Breadcrumbs.php index e3e3b3a..6423f19 100644 --- a/src/Breadcrumbs.php +++ b/src/Breadcrumbs.php @@ -4,14 +4,14 @@ namespace Yiisoft\Yii\Bulma; -use JsonException; -use Yiisoft\Arrays\ArrayHelper; -use Yiisoft\Html\Html; - use function array_key_exists; use function array_merge; use function is_array; + +use JsonException; use function strtr; +use Yiisoft\Arrays\ArrayHelper; +use Yiisoft\Html\Html; /** * The Bulma breadcrumb is a simple navigation component. @@ -68,6 +68,7 @@ public function encodeLabels(bool $value): self /** * Do not render home item. + * * @return self */ public function withoutHomeItem(): self diff --git a/src/Dropdown.php b/src/Dropdown.php index 1d62e27..958c007 100644 --- a/src/Dropdown.php +++ b/src/Dropdown.php @@ -4,14 +4,14 @@ namespace Yiisoft\Yii\Bulma; -use JsonException; -use Yiisoft\Arrays\ArrayHelper; -use Yiisoft\Html\Html; - use function array_key_exists; use function array_merge; use function implode; + use function is_array; +use JsonException; +use Yiisoft\Arrays\ArrayHelper; +use Yiisoft\Html\Html; /** * The dropdown component is a container for a dropdown button and a dropdown menu. @@ -83,7 +83,7 @@ public function buttonLabelOptions(array $value): self public function dividerClass(string $value): self { $new = clone $this; - $new->dividerClass = $value; + $new->dividerClass = $value; return $new; } @@ -97,7 +97,7 @@ public function dividerClass(string $value): self public function itemClass(string $value): self { $new = clone $this; - $new->itemClass = $value; + $new->itemClass = $value; return $new; } @@ -111,7 +111,7 @@ public function itemClass(string $value): self public function itemsClass(string $value): self { $new = clone $this; - $new->itemsClass = $value; + $new->itemsClass = $value; return $new; } diff --git a/src/Menu.php b/src/Menu.php index 3f9f380..96ad5fd 100644 --- a/src/Menu.php +++ b/src/Menu.php @@ -4,15 +4,15 @@ namespace Yiisoft\Yii\Bulma; -use Yiisoft\Arrays\ArrayHelper; -use Yiisoft\Html\Html; - use function array_merge; use function array_values; + use function call_user_func; use function count; use function implode; use function strtr; +use Yiisoft\Arrays\ArrayHelper; +use Yiisoft\Html\Html; /** * The Bulma menu is a vertical navigation component. @@ -60,7 +60,7 @@ protected function run(): string * Whether to automatically activate items according to whether their route setting matches the currently requested * route. * - * @var bool $value + * @var bool * * @return self * @@ -91,7 +91,7 @@ public function activateParents(bool $value): self /** * The CSS class to be appended to the active menu item. * - * @var string $value + * @var string * * @return self */ @@ -148,7 +148,7 @@ public function encodeLabels(bool $value): self * The CSS class that will be assigned to the first item in the main menu or each submenu. Defaults to null, * meaning no such CSS class will be assigned. * - * @var string $value + * @var string * * @return self */ @@ -163,7 +163,7 @@ public function firstItemCssClass(string $value): self * Whether to hide empty menu items. An empty menu item is one whose `url` option is not set and which has no * visible child menu items. * - * @var bool $value + * @var bool * * @return self */ @@ -352,7 +352,7 @@ private function renderItems(array $items): string if (!empty($item['items'])) { $subMenuTemplate = ArrayHelper::getValue($item, 'subMenuTemplate', $this->subMenuTemplate); $menu .= strtr($subMenuTemplate, [ - '{items}' => $this->renderItems($item['items']) + '{items}' => $this->renderItems($item['items']), ]); } @@ -387,9 +387,9 @@ private function renderItem(array $item, array $linkOptions): string $url = '"' . Html::encode($item['url']) . '"'; } return strtr($template, [ - '{url}' => $url, + '{url}' => $url, '{label}' => $item['label'], - '{icon}' => $htmlIcon + '{icon}' => $htmlIcon, ]); } diff --git a/src/Message.php b/src/Message.php index b8af24f..65a82ff 100644 --- a/src/Message.php +++ b/src/Message.php @@ -254,7 +254,7 @@ private function renderCloseButton(): ?string $tag = ArrayHelper::remove($this->closeButtonOptions, 'tag', 'button'); $label = ArrayHelper::remove($this->closeButtonOptions, 'label', Html::tag('span', '×', [ - 'aria-hidden' => 'true' + 'aria-hidden' => 'true', ])); if ($tag === 'button') { diff --git a/src/Nav.php b/src/Nav.php index 0d74aa9..c5db69f 100644 --- a/src/Nav.php +++ b/src/Nav.php @@ -4,14 +4,14 @@ namespace Yiisoft\Yii\Bulma; -use JsonException; -use Yiisoft\Arrays\ArrayHelper; -use Yiisoft\Html\Html; - use function array_key_exists; use function implode; use function is_array; +use JsonException; +use Yiisoft\Arrays\ArrayHelper; +use Yiisoft\Html\Html; + final class Nav extends Widget { private bool $activateItems = true; @@ -188,7 +188,7 @@ private function isChildActive(array $items, bool &$active): array * currentPath for the item and the rest of the elements are the associated parameters. Only when its currentPath * and parameters match {@see currentPath}, respectively, will a menu item be considered active. * - * @param array|string|object $item the menu item to be checked + * @param array|object|string $item the menu item to be checked * * @return bool whether the menu item is active */ @@ -198,11 +198,11 @@ private function isItemActive($item): bool return ArrayHelper::getValue($item, 'active'); } - if (isset($item['url']) && $this->currentPath !== '/' && $item['url'] === $this->currentPath && $this->activateItems) { - return true; - } + return (bool) (isset($item['url']) && $this->currentPath !== '/' && $item['url'] === $this->currentPath && $this->activateItems) + + - return false; + ; } private function renderIcon(string $label, string $icon, array $iconOptions): string diff --git a/src/NavBar.php b/src/NavBar.php index 328ac09..8e41988 100644 --- a/src/NavBar.php +++ b/src/NavBar.php @@ -5,10 +5,10 @@ namespace Yiisoft\Yii\Bulma; use JsonException; +use function strpos; use Yiisoft\Arrays\ArrayHelper; -use Yiisoft\Html\Html; -use function strpos; +use Yiisoft\Html\Html; /** * The navbar component is a responsive and versatile horizontal navigation bar. @@ -32,7 +32,7 @@ final class NavBar extends Widget 'aria-expanded' => 'false', 'aria-label' => 'menu', 'class' => 'navbar-burger', - 'role' => 'button' + 'role' => 'button', ]; public function start(): string diff --git a/src/Widget.php b/src/Widget.php index e371368..46aee72 100644 --- a/src/Widget.php +++ b/src/Widget.php @@ -4,10 +4,10 @@ namespace Yiisoft\Yii\Bulma; +use function strpos; use Yiisoft\Html\Html; -use Yiisoft\Widget\Widget as BaseWidget; -use function strpos; +use Yiisoft\Widget\Widget as BaseWidget; abstract class Widget extends BaseWidget { diff --git a/tests/BreadcrumbsTest.php b/tests/BreadcrumbsTest.php index 343cf36..906f44c 100644 --- a/tests/BreadcrumbsTest.php +++ b/tests/BreadcrumbsTest.php @@ -53,8 +53,8 @@ public function testBreadcrumbsEncodeLabels(): void [ [ 'label' => 'Seeting & profile', - 'url' => '/about' - ] + 'url' => '/about', + ], ] ) ->render(); @@ -212,7 +212,7 @@ public function testBreadcrumbsLinksException(): void $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('The "label" element is required for each link.'); $html = Breadcrumbs::widget() - ->items([['url' => '/about', 'template' => "
{link}
"]]) + ->items([['url' => '/about', 'template' => '
{link}
']]) ->render(); $expected = << 'Index', 'url' => '/index', 'icon' => 'fas fa-home', - 'iconOptions' => ['class' => 'icon'] + 'iconOptions' => ['class' => 'icon'], ] ) ->items( @@ -290,8 +290,8 @@ public function testBreadcrumbsIcons(): void 'label' => 'About', 'url' => '/about', 'icon' => 'fas fa-thumbs-up', - 'iconOptions' => ['class' => 'icon'] - ] + 'iconOptions' => ['class' => 'icon'], + ], ] ) ->options(['class' => 'is-centered']) diff --git a/tests/MenuTest.php b/tests/MenuTest.php index 6bae72c..4d26447 100644 --- a/tests/MenuTest.php +++ b/tests/MenuTest.php @@ -45,22 +45,22 @@ public function testMenuItems(): void 'url' => 'site/index', 'icon' => 'mdi mdi-desktop-mac', 'iconOptions' => ['class' => 'icon'], - 'linkOptions' => ['class' => 'testMe'] + 'linkOptions' => ['class' => 'testMe'], ], [ 'label' => 'Logout', 'url' => 'site/logout', 'icon' => 'mdi mdi-logout', 'iconOptions' => ['class' => 'icon'], - 'linkOptions' => ['class' => 'testMe'] + 'linkOptions' => ['class' => 'testMe'], ], - ] + ], ], ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], ]) ->render(); @@ -105,7 +105,7 @@ public function testMenuItemEmptyLabel(): void $html = Menu::widget() ->items([ - ['url' => '#'] + ['url' => '#'], ]) ->render(); @@ -132,20 +132,20 @@ public function testMenuItemVisible(): void 'label' => 'Dashboard', 'url' => 'site/index', 'icon' => 'mdi mdi-desktop-mac', - 'iconOptions' => ['class' => 'icon'] + 'iconOptions' => ['class' => 'icon'], ], - ] + ], ], ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], [ 'label' => 'Logout', 'url' => 'site/logout', - 'visible' => false + 'visible' => false, ], ]) ->render(); @@ -177,8 +177,8 @@ public function testMenuEncodeLabel(): void ->encodeLabels(false) ->items([ [ - 'label' => 'Authors & Publications', - 'url' => '#', + 'label' => 'Authors & Publications', + 'url' => '#', 'encode' => true, ], ]) @@ -200,8 +200,8 @@ public function testMenuEncodeLabel(): void ->encodeLabels(true) ->items([ [ - 'label' => 'Authors & Publications', - 'url' => '#', + 'label' => 'Authors & Publications', + 'url' => '#', ], ]) ->render(); @@ -222,8 +222,8 @@ public function testMenuEncodeLabel(): void ->encodeLabels(false) ->items([ [ - 'label' => 'Authors & Publications', - 'url' => '#', + 'label' => 'Authors & Publications', + 'url' => '#', ], ]) ->render(); @@ -250,13 +250,13 @@ public function testMenuTagOption(): void ]) ->items([ [ - 'label' => 'item1', - 'url' => '#', + 'label' => 'item1', + 'url' => '#', 'options' => ['tag' => 'div'], ], [ - 'label' => 'item2', - 'url' => '#', + 'label' => 'item2', + 'url' => '#', 'options' => ['tag' => false], ], ]) @@ -283,11 +283,11 @@ public function testMenuTagOption(): void ->items([ [ 'label' => 'item1', - 'url' => '#', + 'url' => '#', ], [ 'label' => 'item2', - 'url' => '#', + 'url' => '#', ], ]) ->itemOptions(['tag' => false]) @@ -314,12 +314,12 @@ public function testMenuItemTemplate(): void ->linkTemplate('') ->items([ [ - 'label' => 'item1', - 'url' => '#', + 'label' => 'item1', + 'url' => '#', 'template' => 'label: {label}; url: {url}', ], [ - 'label' => 'item2', + 'label' => 'item2', 'template' => 'label: {label}', ], [ @@ -351,17 +351,17 @@ public function testMenuActiveItemClosure(): void ->labelTemplate('') ->items([ [ - 'label' => 'item1', - 'url' => '#', + 'label' => 'item1', + 'url' => '#', 'template' => 'label: {label}; url: {url}', - 'active' => function ($item, $hasActiveChild, $isItemActive, $widget) { + 'active' => function ($item, $hasActiveChild, $isItemActive, $widget) { return isset($item, $hasActiveChild, $isItemActive, $widget); }, ], [ - 'label' => 'item2', + 'label' => 'item2', 'template' => 'label: {label}', - 'active' => false, + 'active' => false, ], ]) ->render(); @@ -388,9 +388,9 @@ public function testMenuItemClassAsArray(): void ->activeCssClass('item-active') ->items([ [ - 'label' => 'item1', - 'url' => '#', - 'active' => true, + 'label' => 'item1', + 'url' => '#', + 'active' => true, 'options' => [ 'class' => [ 'someclass', @@ -398,8 +398,8 @@ public function testMenuItemClassAsArray(): void ], ], [ - 'label' => 'item2', - 'url' => '#', + 'label' => 'item2', + 'url' => '#', 'options' => [ 'class' => [ 'another-class', @@ -410,11 +410,11 @@ public function testMenuItemClassAsArray(): void ], [ 'label' => 'item3', - 'url' => '#', + 'url' => '#', ], [ - 'label' => 'item4', - 'url' => '#', + 'label' => 'item4', + 'url' => '#', 'options' => [ 'class' => [ 'some-other-class', @@ -448,27 +448,27 @@ public function testMenuItemClassAsString(): void ->activeCssClass('item-active') ->items([ [ - 'label' => 'item1', - 'url' => '#', + 'label' => 'item1', + 'url' => '#', 'options' => [ 'class' => 'someclass', ], ], [ 'label' => 'item2', - 'url' => '#', + 'url' => '#', ], [ - 'label' => 'item3', - 'url' => '#', + 'label' => 'item3', + 'url' => '#', 'options' => [ 'class' => 'some classes', ], ], [ - 'label' => 'item4', - 'url' => '#', - 'active' => true, + 'label' => 'item4', + 'url' => '#', + 'active' => true, 'options' => [ 'class' => 'another-class other--class two classes', ], @@ -498,12 +498,12 @@ public function testMenuCurrentPath(): void ->currentPath('/setting') ->items([ [ - 'label' => 'Setting', - 'url' => '/setting', + 'label' => 'Setting', + 'url' => '/setting', ], [ 'label' => 'Profile', - 'url' => '/profile', + 'url' => '/profile', ], ]) ->render(); @@ -531,16 +531,16 @@ public function testMenuFirstItemCssClass(): void ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], [ - 'label' => 'Setting', - 'url' => '/setting', + 'label' => 'Setting', + 'url' => '/setting', ], [ 'label' => 'Profile', - 'url' => '/profile', + 'url' => '/profile', ], ]) ->render(); @@ -573,16 +573,16 @@ public function testMenuLastItemCssClass(): void ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], [ - 'label' => 'Setting', - 'url' => '/setting', + 'label' => 'Setting', + 'url' => '/setting', ], [ 'label' => 'Profile', - 'url' => '/profile', + 'url' => '/profile', ], ]) ->render(); @@ -622,11 +622,10 @@ public function testMenuActivateItems(): void 'items' => [ ['label' => 'Update', 'url' => 'user/update'], ['label' => 'Block', 'url' => 'user/block'], - ] - + ], ], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], ]) ->render(); @@ -664,11 +663,10 @@ public function testMenuActivateItems(): void 'items' => [ ['label' => 'Update', 'url' => 'user/update'], ['label' => 'Block', 'url' => 'user/block'], - ] - + ], ], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], ]) ->render(); @@ -709,11 +707,10 @@ public function testMenuActivateParentItems(): void 'items' => [ ['label' => 'Update', 'url' => 'user/update'], ['label' => 'Block', 'url' => 'user/block'], - ] - + ], ], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], ]) ->render(); @@ -751,11 +748,10 @@ public function testMenuActivateParentItems(): void 'items' => [ ['label' => 'Update', 'url' => 'user/update'], ['label' => 'Block', 'url' => 'user/block'], - ] - + ], ], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], ]) ->render(); @@ -793,16 +789,16 @@ public function testMenuBrand(): void ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], [ - 'label' => 'Setting', - 'url' => '/setting', + 'label' => 'Setting', + 'url' => '/setting', ], [ 'label' => 'Profile', - 'url' => '/profile', + 'url' => '/profile', ], ]) ->render(); @@ -841,16 +837,16 @@ public function testMenuHiddenItems(): void ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], [ - 'label' => 'Setting', - 'url' => '/setting', + 'label' => 'Setting', + 'url' => '/setting', ], [ 'label' => 'Profile', - 'items' => [] + 'items' => [], ], ]) ->render(); @@ -882,16 +878,16 @@ public function testMenuHiddenItems(): void ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], [ - 'label' => 'Setting', - 'url' => '/setting', + 'label' => 'Setting', + 'url' => '/setting', ], [ 'label' => 'Profile', - 'items' => [] + 'items' => [], ], ]) ->render(); @@ -921,16 +917,16 @@ public function testMenuSubMenuTemplate(): void ['label' => 'Users', 'items' => [ ['label' => 'Manager', 'url' => 'user/index'], - ['label' => 'Export', 'url' => 'user/export'] - ] + ['label' => 'Export', 'url' => 'user/export'], + ], ], [ - 'label' => 'Setting', - 'url' => '/setting', + 'label' => 'Setting', + 'url' => '/setting', ], [ 'label' => 'Profile', - 'url' => '/profile', + 'url' => '/profile', ], ]) ->subMenuTemplate('') diff --git a/tests/MessageTest.php b/tests/MessageTest.php index 1ee57ca..94957af 100644 --- a/tests/MessageTest.php +++ b/tests/MessageTest.php @@ -56,7 +56,6 @@ public function testMessageAutoIdPrefix(): void $this->assertEqualsWithoutLE($expectedHtml, $html); } - public function testMessageHeaderColor(): void { Message::counter(0); @@ -157,7 +156,6 @@ public function testMessageOptionsCloseButton(): void $this->assertEqualsWithoutLE($expectedHtml, $html); } - public function testMessageOptionsHeader(): void { Message::counter(0); diff --git a/tests/NavTest.php b/tests/NavTest.php index f70d322..6a7da93 100644 --- a/tests/NavTest.php +++ b/tests/NavTest.php @@ -17,8 +17,8 @@ public function testNav(): void ->items([ [ 'label' => 'Page1', - 'url' => '#' - ] + 'url' => '#', + ], ]) ->render(); @@ -35,8 +35,8 @@ public function testNavWithoutUrl(): void $html = Nav::widget() ->items([ [ - 'label' => 'Page1' - ] + 'label' => 'Page1', + ], ]) ->render(); @@ -59,7 +59,7 @@ public function testNavDropdown(): void ['label' => 'Page2', 'url' => '#'], '-', ['label' => 'Page3', 'url' => '#'], - ] + ], ], ]) ->render(); @@ -96,7 +96,7 @@ public function testRenderDropdownWithDropdownOptions(): void ['label' => 'Page2', 'url' => '#'], ['label' => 'Page3', 'url' => '#'], ], - 'visible' => true + 'visible' => true, ], [ 'label' => 'Dropdown2', @@ -104,8 +104,8 @@ public function testRenderDropdownWithDropdownOptions(): void ['label' => 'Page4', 'url' => '#'], ['label' => 'Page5', 'url' => '#'], ], - 'visible' => false - ] + 'visible' => false, + ], ]) ->render(); @@ -136,7 +136,7 @@ public function testNavEmptyItems(): void [ 'label' => 'Page4', 'items' => [], - ] + ], ]) ->render(); @@ -356,7 +356,7 @@ public function testNavWithoutEncodeLabelsItem(): void ->items([ [ 'label' => 'a & b', - 'encode' => false + 'encode' => false, ], ]) ->render(); @@ -376,7 +376,7 @@ public function testNavDropdownDivider(): void ->items([ [ 'label' => 'index', - 'url' => '#' + 'url' => '#', ], [ 'label' => 'Dropdown', @@ -425,7 +425,6 @@ public function testNavExceptionLabelItems(): void ->render(); } - public function testNavDropdownItemsEncodeLabels(): void { Nav::counter(0); @@ -489,7 +488,7 @@ public function testNavLinkDisabled(): void [ 'label' => 'Link disable', 'url' => '#', - 'disabled' => true + 'disabled' => true, ], ]) ->render(); @@ -515,7 +514,7 @@ public function testNavDropdownLinkDisabled(): void ['label' => 'Level 1', 'url' => '#', 'disabled' => true], ['label' => 'Level 2', 'url' => '#'], ], - ] + ], ]) ->render(); @@ -551,13 +550,13 @@ public function testNavIcon(): void 'label' => 'Setting Account', 'url' => '/setting/account', 'icon' => 'fas fa-user-cog', - 'iconOptions' => ['class' => 'icon'] + 'iconOptions' => ['class' => 'icon'], ], [ 'label' => 'Profile', 'url' => '/profile', 'icon' => 'fas fa-users', - 'iconOptions' => ['class' => 'icon'] + 'iconOptions' => ['class' => 'icon'], ], [ 'label' => 'Admin' . Html::img( @@ -567,8 +566,8 @@ public function testNavIcon(): void 'items' => [ ['label' => 'Logout', 'url' => '/auth/logout'], ], - 'encode' => false - ] + 'encode' => false, + ], ]) ->render(); diff --git a/tests/TestCase.php b/tests/TestCase.php index aa7508a..e7d85d2 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -9,12 +9,12 @@ use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; +use Yiisoft\Aliases\Aliases; use Yiisoft\Assets\AssetConverter; use Yiisoft\Assets\AssetConverterInterface; use Yiisoft\Assets\AssetManager; use Yiisoft\Assets\AssetPublisher; use Yiisoft\Assets\AssetPublisherInterface; -use Yiisoft\Aliases\Aliases; use Yiisoft\Di\Container; use Yiisoft\Factory\Definitions\Reference; use Yiisoft\Files\FileHelper; @@ -59,8 +59,6 @@ protected function tearDown(): void * @param string $expected * @param string $actual * @param string $message - * - * @return void */ protected function assertEqualsWithoutLE(string $expected, string $actual, string $message = ''): void { @@ -96,7 +94,7 @@ private function config(): array { return [ Aliases::class => [ - '__class' => Aliases::class + '__class' => Aliases::class, ], LoggerInterface::class => NullLogger::class, @@ -105,15 +103,15 @@ private function config(): array '__class' => AssetConverter::class, '__construct()' => [ Reference::to(Aliases::class), - Reference::to(LoggerInterface::class) - ] + Reference::to(LoggerInterface::class), + ], ], AssetPublisherInterface::class => [ '__class' => AssetPublisher::class, '__construct()' => [ - Reference::to(Aliases::class) - ] + Reference::to(Aliases::class), + ], ], AssetManager::class => static function (ContainerInterface $container) { @@ -123,7 +121,7 @@ private function config(): array $assetManager->setPublisher($container->get(AssetPublisherInterface::class)); return $assetManager; - } + }, ]; } }