Commit b264dd2b authored by alexpott's avatar alexpott

Issue #2710081 by alexpott: Fix 'Drupal.Formatting.SpaceInlineIf' coding standard

parent 1b3ffe2a
......@@ -74,7 +74,7 @@ protected function setUp() {
* Created custom block.
*/
protected function createBlockContent($title = FALSE, $bundle = 'basic', $save = TRUE) {
$title = ($title ? : $this->randomMachineName());
$title = $title ?: $this->randomMachineName();
$block_content = BlockContent::create(array(
'info' => $title,
'type' => $bundle,
......
......@@ -91,8 +91,8 @@ public function getTranslatorPermissions() {
* Created custom block.
*/
protected function createBlockContent($title = FALSE, $bundle = FALSE) {
$title = ($title ? : $this->randomMachineName());
$bundle = ($bundle ? : $this->bundle);
$title = $title ?: $this->randomMachineName();
$bundle = $bundle ?: $this->bundle;
$block_content = BlockContent::create(array(
'info' => $title,
'type' => $bundle,
......
......@@ -101,7 +101,7 @@ public function getHandler($item, $override = NULL) {
}
// @todo This is crazy. Find a way to remove the override functionality.
$plugin_id = $override ? : $definition['id'];
$plugin_id = $override ?: $definition['id'];
// Try to use the overridden handler.
$handler = $this->createInstance($plugin_id, $definition);
if ($override && method_exists($handler, 'broken') && $handler->broken()) {
......
......@@ -20,6 +20,7 @@
<rule ref="Drupal.ControlStructures.ElseIf"/>
<rule ref="Drupal.Files.EndFileNewline"/>
<rule ref="Drupal.Files.TxtFileLineLength"/>
<rule ref="Drupal.Formatting.SpaceInlineIf"/>
<rule ref="Drupal.Functions.DiscouragedFunctions"/>
<rule ref="Drupal.Functions.FunctionDeclaration.SpaceAfter"/>
<rule ref="Drupal.Functions.FunctionDeclaration.SpaceBeforeParenthesis"/>
......
Markdown is supported
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