Skip to content

Commit

Permalink
CR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
damianz5 committed Sep 6, 2021
1 parent 8bde58e commit 1e153d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/lib/Configuration/Provider/CKEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function getName(): string

/**
* Returns CKEditor configuration.
*
* @phpstan-return array<array-key, array{
* toolbars: array<string>,
* customTags: array<string>,
Expand All @@ -53,6 +54,7 @@ public function getConfiguration(): array

/**
* Returns toolbars configuration.
*
* @phpstan-return array<string>
*/
private function getToolbars(): array
Expand All @@ -72,6 +74,7 @@ static function (string $key): bool {

/**
* Returns customTags configuration.
*
* @phpstan-return array<string>
*/
private function getCustomTags(): array
Expand All @@ -91,6 +94,7 @@ static function (string $key): bool {

/**
* Returns filtered Toolbars configuration.
*
* @phpstan-return array<string>
*/
private function filterToolbars(
Expand Down Expand Up @@ -121,13 +125,15 @@ static function (array $value): bool {
}
}

// Removes last separator from the toolbars list.
array_pop($toolbars);

return array_values($toolbars);
}

/**
* Returns List of visible, sorted buttons.
*
* @phpstan-return array<string>
*/
private function getToolbarButtons(array $buttons): array
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/Configuration/Provider/CKEditorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -35,7 +35,7 @@ public function testGetConfiguration(): void
$provider = $this->createProvider();

$this->configResolver
->expects($this->any())
->expects($this->exactly(2))
->method('hasParameter')
->willReturn(false);

Expand Down

0 comments on commit 1e153d6

Please sign in to comment.