Skip to content

Commit

Permalink
Fix coding standards.
Browse files Browse the repository at this point in the history
- Fixes #507
- Pins coder to 8.2.x as 8.3.x has issues.
  • Loading branch information
jhedstrom committed Sep 20, 2018
1 parent c4cee77 commit 5a797b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"phpspec/phpspec": "~2.0 || ~4.0",
"behat/mink-zombie-driver": "^1.2",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"drupal/coder": "^8.2"
"drupal/coder": "~8.2.12"
},
"scripts": {
"test": [
Expand Down
18 changes: 9 additions & 9 deletions src/Drupal/DrupalExtension/Context/RawDrupalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,17 +404,17 @@ public function parseEntityFields($entity_type, \stdClass $entity)
// Reset the multicolumn field if the field name does not contain a column.
if (strpos($field, ':') === false) {
$multicolumn_field = '';
} // Start tracking a new multicolumn field if the field name contains a ':'
// which is preceded by at least 1 character.
elseif (strpos($field, ':', 1) !== false) {
} elseif (strpos($field, ':', 1) !== false) {
// Start tracking a new multicolumn field if the field name contains a ':'
// which is preceded by at least 1 character.
list($multicolumn_field, $multicolumn_column) = explode(':', $field);
} // If a field name starts with a ':' but we are not yet tracking a
// multicolumn field we don't know to which field this belongs.
elseif (empty($multicolumn_field)) {
} elseif (empty($multicolumn_field)) {
// If a field name starts with a ':' but we are not yet tracking a
// multicolumn field we don't know to which field this belongs.
throw new \Exception('Field name missing for ' . $field);
} // Update the column name if the field name starts with a ':' and we are
// already tracking a multicolumn field.
else {
} else {
// Update the column name if the field name starts with a ':' and we are
// already tracking a multicolumn field.
$multicolumn_column = substr($field, 1);
}

Expand Down

0 comments on commit 5a797b7

Please sign in to comment.