.../src/Plugin/CKEditor5PluginDefinition.php | 2 +- .../src/Kernel/CKEditor5PluginManagerTest.php | 24 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php b/core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php index 3af202c7c1..371a53aeaa 100644 --- a/core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php +++ b/core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php @@ -318,7 +318,7 @@ public function getDeriver() { // annotation CKEditor 5 plugin definitions (because they create an instance // of the DrupalAspectsOfCKEditor5Plugin annotation level), not for CKEditor // 5 plugin definitions in YAML. - // @see \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::__construct() + // @see \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::processDefinition() // @see \Drupal\ckeditor5\Annotation\CKEditor5Plugin::__construct() return $this->drupal['deriver'] ?? NULL; } diff --git a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php index e92f5eda67..4ef94c7e77 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/CKEditor5PluginManagerTest.php @@ -1587,11 +1587,11 @@ public function providerTestDerivedPluginDefinitions(): \Generator { class SimpleDeriver extends DeriverBase { public function getDerivativeDefinitions($base_plugin_definition) { assert($base_plugin_definition instanceof CKEditor5PluginDefinition); - foreach (['bar', 'baz'] as $derivative) { + foreach (['bar', 'baz'] as $id) { $definition = $base_plugin_definition->toArray(); - $definition['id'] = $derivative; - $definition['drupal']['label'] = sprintf("Foo %s", $derivative); - $this->derivatives[$definition['id']] = new CKEditor5PluginDefinition($definition); + $definition['id'] = $id; + $definition['drupal']['label'] = sprintf("Foo %s", $id); + $this->derivatives[$id] = new CKEditor5PluginDefinition($definition); } return $this->derivatives; } @@ -1659,11 +1659,11 @@ public function getDerivativeDefinitions($base_plugin_definition) { class SimpleDeriver extends DeriverBase { public function getDerivativeDefinitions($base_plugin_definition) { assert($base_plugin_definition instanceof CKEditor5PluginDefinition); - foreach (['bar', 'baz'] as $derivative) { + foreach (['bar', 'baz'] as $id) { $definition = $base_plugin_definition->toArray(); - $definition['id'] = $derivative; - $definition['drupal']['label'] = sprintf("Foo %s", $derivative); - $this->derivatives[$definition['id']] = $definition; + $definition['id'] = $id; + $definition['drupal']['label'] = sprintf("Foo %s", $id); + $this->derivatives[$id] = $definition; } return $this->derivatives; } @@ -1788,13 +1788,13 @@ class Foo extends CKEditor5PluginDefault { class MaximalDeriver extends DeriverBase { public function getDerivativeDefinitions($base_plugin_definition) { assert($base_plugin_definition instanceof CKEditor5PluginDefinition); - foreach (['A', 'B'] as $derivative) { + foreach (['A', 'B'] as $id) { $definition = $base_plugin_definition->toArray(); - $definition['id'] = $derivative; - $definition['drupal']['label'] = sprintf("Foo %s", $derivative); + $definition['id'] = $id; + $definition['drupal']['label'] = sprintf("Foo %s", $id); $definition['drupal']['elements'] = FALSE; $definition['ckeditor5']['plugins'] = []; - $this->derivatives[$definition['id']] = new CKEditor5PluginDefinition($definition); + $this->derivatives[$id] = new CKEditor5PluginDefinition($definition); } return $this->derivatives; }