From b264dd2b8150f904386b00d9b10452c89169bdde Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Wed, 27 Apr 2016 11:12:34 +0100
Subject: [PATCH] Issue #2710081 by alexpott: Fix
 'Drupal.Formatting.SpaceInlineIf' coding standard

---
 core/modules/block_content/src/Tests/BlockContentTestBase.php | 2 +-
 .../block_content/src/Tests/BlockContentTranslationUITest.php | 4 ++--
 core/modules/views/src/Plugin/ViewsHandlerManager.php         | 2 +-
 core/phpcs.xml.dist                                           | 1 +
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/core/modules/block_content/src/Tests/BlockContentTestBase.php b/core/modules/block_content/src/Tests/BlockContentTestBase.php
index 307933c27316..402103253962 100644
--- a/core/modules/block_content/src/Tests/BlockContentTestBase.php
+++ b/core/modules/block_content/src/Tests/BlockContentTestBase.php
@@ -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,
diff --git a/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php b/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php
index c08f92dece73..7748b37c52d4 100644
--- a/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php
+++ b/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php
@@ -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,
diff --git a/core/modules/views/src/Plugin/ViewsHandlerManager.php b/core/modules/views/src/Plugin/ViewsHandlerManager.php
index b958cec5f6c2..f6ddf041d5c6 100644
--- a/core/modules/views/src/Plugin/ViewsHandlerManager.php
+++ b/core/modules/views/src/Plugin/ViewsHandlerManager.php
@@ -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()) {
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index a529c223627c..34c0ef99295e 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -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"/>
-- 
GitLab