From 1e153d6b10eb3120d9ab90e491481cac94d749a3 Mon Sep 17 00:00:00 2001 From: Damian Zabawa Date: Mon, 6 Sep 2021 11:42:40 +0200 Subject: [PATCH] CR changes --- src/lib/Configuration/Provider/CKEditor.php | 6 ++++++ tests/lib/Configuration/Provider/CKEditorTest.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/Configuration/Provider/CKEditor.php b/src/lib/Configuration/Provider/CKEditor.php index 3be9c71b..0917e6c1 100644 --- a/src/lib/Configuration/Provider/CKEditor.php +++ b/src/lib/Configuration/Provider/CKEditor.php @@ -38,6 +38,7 @@ public function getName(): string /** * Returns CKEditor configuration. + * * @phpstan-return array, * customTags: array, @@ -53,6 +54,7 @@ public function getConfiguration(): array /** * Returns toolbars configuration. + * * @phpstan-return array */ private function getToolbars(): array @@ -72,6 +74,7 @@ static function (string $key): bool { /** * Returns customTags configuration. + * * @phpstan-return array */ private function getCustomTags(): array @@ -91,6 +94,7 @@ static function (string $key): bool { /** * Returns filtered Toolbars configuration. + * * @phpstan-return array */ private function filterToolbars( @@ -121,6 +125,7 @@ static function (array $value): bool { } } + // Removes last separator from the toolbars list. array_pop($toolbars); return array_values($toolbars); @@ -128,6 +133,7 @@ static function (array $value): bool { /** * Returns List of visible, sorted buttons. + * * @phpstan-return array */ private function getToolbarButtons(array $buttons): array diff --git a/tests/lib/Configuration/Provider/CKEditorTest.php b/tests/lib/Configuration/Provider/CKEditorTest.php index 90eabf73..def2e2e5 100644 --- a/tests/lib/Configuration/Provider/CKEditorTest.php +++ b/tests/lib/Configuration/Provider/CKEditorTest.php @@ -13,7 +13,7 @@ use EzSystems\EzPlatformRichText\SPI\Configuration\Provider; use EzSystems\EzPlatformRichTextBundle\DependencyInjection\Configuration\Parser\FieldType\RichText; -class CKEditorTest extends BaseProviderTestCase +final class CKEditorTest extends BaseProviderTestCase { public function createProvider(ConfigResolverInterface $configResolver = null): Provider { @@ -35,7 +35,7 @@ public function testGetConfiguration(): void $provider = $this->createProvider(); $this->configResolver - ->expects($this->any()) + ->expects($this->exactly(2)) ->method('hasParameter') ->willReturn(false);