Commit cc28eaf5 authored by heddn's avatar heddn
Browse files

fix phpcs

parent 7919127e
...@@ -124,7 +124,7 @@ class DomApplyStyles extends DomProcessBase implements ContainerFactoryPluginInt ...@@ -124,7 +124,7 @@ class DomApplyStyles extends DomProcessBase implements ContainerFactoryPluginInt
* @param string $format * @param string $format
* The text format from which to get configured styles. * The text format from which to get configured styles.
* *
* @throws InvalidPluginDefinitionException * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
*/ */
protected function setStyles($format) { protected function setStyles($format) {
if (empty($format) || !is_string($format)) { if (empty($format) || !is_string($format)) {
...@@ -144,7 +144,7 @@ class DomApplyStyles extends DomProcessBase implements ContainerFactoryPluginInt ...@@ -144,7 +144,7 @@ class DomApplyStyles extends DomProcessBase implements ContainerFactoryPluginInt
/** /**
* Validate the configured rules. * Validate the configured rules.
* *
* @throws InvalidPluginDefinitionException * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
*/ */
protected function validateRules() { protected function validateRules() {
if (!array_key_exists('rules', $this->configuration) || !is_array($this->configuration['rules'])) { if (!array_key_exists('rules', $this->configuration) || !is_array($this->configuration['rules'])) {
......
...@@ -4,7 +4,6 @@ namespace Drupal\migrate_plus\Plugin\migrate\process; ...@@ -4,7 +4,6 @@ namespace Drupal\migrate_plus\Plugin\migrate\process;
use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException; use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\migrate\MigrateException;
use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Plugin\MigratePluginManagerInterface; use Drupal\migrate\Plugin\MigratePluginManagerInterface;
use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Plugin\MigrationInterface;
...@@ -118,7 +117,7 @@ class DomMigrationLookup extends DomStrReplace implements ContainerFactoryPlugin ...@@ -118,7 +117,7 @@ class DomMigrationLookup extends DomStrReplace implements ContainerFactoryPlugin
"Configuration option 'migration' should be a keyed array." "Configuration option 'migration' should be a keyed array."
); );
} }
// Add missing values if possible // Add missing values if possible.
$default_replace = isset($this->configuration['replace']) ? $this->configuration['replace'] : NULL; $default_replace = isset($this->configuration['replace']) ? $this->configuration['replace'] : NULL;
foreach ($this->configuration['migrations'] as $migration_name => $configuration_item) { foreach ($this->configuration['migrations'] as $migration_name => $configuration_item) {
if (!empty($configuration_item['replace'])) { if (!empty($configuration_item['replace'])) {
......
...@@ -122,15 +122,15 @@ class DomMigrationLookupTest extends MigrateProcessTestCase { ...@@ -122,15 +122,15 @@ class DomMigrationLookupTest extends MigrateProcessTestCase {
$cases = [ $cases = [
'migrations-empty' => [ 'migrations-empty' => [
['migrations' => []], ['migrations' => []],
"Configuration option 'migration' is required." "Configuration option 'migration' is required.",
], ],
'migrations-invalid' => [ 'migrations-invalid' => [
['migrations' => 42], ['migrations' => 42],
"Configuration option 'migration' should be a keyed array." "Configuration option 'migration' should be a keyed array.",
], ],
'replace-null' => [ 'replace-null' => [
['replace' => NULL], ['replace' => NULL],
"Please define either a global replace for all migrations, or a specific one for 'migrations.users'." "Please define either a global replace for all migrations, or a specific one for 'migrations.users'.",
], ],
]; ];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment