Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
migrate_plus
Commits
cc28eaf5
Commit
cc28eaf5
authored
Aug 07, 2019
by
heddn
Browse files
fix phpcs
parent
7919127e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Plugin/migrate/process/DomApplyStyles.php
View file @
cc28eaf5
...
...
@@ -124,7 +124,7 @@ class DomApplyStyles extends DomProcessBase implements ContainerFactoryPluginInt
* @param string $format
* The text format from which to get configured styles.
*
* @throws InvalidPluginDefinitionException
* @throws
\Drupal\Component\Plugin\Exception\
InvalidPluginDefinitionException
*/
protected
function
setStyles
(
$format
)
{
if
(
empty
(
$format
)
||
!
is_string
(
$format
))
{
...
...
@@ -144,7 +144,7 @@ class DomApplyStyles extends DomProcessBase implements ContainerFactoryPluginInt
/**
* Validate the configured rules.
*
* @throws InvalidPluginDefinitionException
* @throws
\Drupal\Component\Plugin\Exception\
InvalidPluginDefinitionException
*/
protected
function
validateRules
()
{
if
(
!
array_key_exists
(
'rules'
,
$this
->
configuration
)
||
!
is_array
(
$this
->
configuration
[
'rules'
]))
{
...
...
src/Plugin/migrate/process/DomMigrationLookup.php
View file @
cc28eaf5
...
...
@@ -4,7 +4,6 @@ namespace Drupal\migrate_plus\Plugin\migrate\process;
use
Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\migrate\MigrateException
;
use
Drupal\migrate\MigrateExecutableInterface
;
use
Drupal\migrate\Plugin\MigratePluginManagerInterface
;
use
Drupal\migrate\Plugin\MigrationInterface
;
...
...
@@ -118,7 +117,7 @@ class DomMigrationLookup extends DomStrReplace implements ContainerFactoryPlugin
"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
;
foreach
(
$this
->
configuration
[
'migrations'
]
as
$migration_name
=>
$configuration_item
)
{
if
(
!
empty
(
$configuration_item
[
'replace'
]))
{
...
...
tests/src/Unit/process/DomMigrationLookupTest.php
View file @
cc28eaf5
...
...
@@ -122,15 +122,15 @@ class DomMigrationLookupTest extends MigrateProcessTestCase {
$cases
=
[
'migrations-empty'
=>
[
[
'migrations'
=>
[]],
"Configuration option 'migration' is required."
"Configuration option 'migration' is required."
,
],
'migrations-invalid'
=>
[
[
'migrations'
=>
42
],
"Configuration option 'migration' should be a keyed array."
"Configuration option 'migration' should be a keyed array."
,
],
'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'."
,
],
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment