Unverified Commit 97924855 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3207308 by longwave: Fix 'Generic.Formatting.DisallowMultipleStatements' coding standard

parent e91fe8a9
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -240,13 +240,15 @@ protected static function attributes($attributes) {
        case 1:
          // Equals sign or valueless ("selected").
          if (preg_match('/^\s*=\s*/', $attributes)) {
            $working = 1; $mode = 2;
            $working = 1;
            $mode = 2;
            $attributes = preg_replace('/^\s*=\s*/', '', $attributes);
            break;
          }

          if (preg_match('/^\s+/', $attributes)) {
            $working = 1; $mode = 0;
            $working = 1;
            $mode = 0;
            if (!$skip) {
              $attributes_array[] = $attribute_name;
            }
@@ -274,7 +276,8 @@ protected static function attributes($attributes) {
            if (!$skip) {
              $attributes_array[] = "$attribute_name='$value'";
            }
            $working = 1; $mode = 0;
            $working = 1;
            $mode = 0;
            $attributes = preg_replace("/^'[^']*'(\s+|$)/", '', $attributes);
            break;
          }
@@ -285,7 +288,8 @@ protected static function attributes($attributes) {
            if (!$skip) {
              $attributes_array[] = "$attribute_name=\"$value\"";
            }
            $working = 1; $mode = 0;
            $working = 1;
            $mode = 0;
            $attributes = preg_replace("%^[^\s\"']+(\s+|$)%", '', $attributes);
          }
          break;
+2 −1
Original line number Diff line number Diff line
@@ -65,7 +65,8 @@ public function testInstallOtherModuleFirst() {
    // Ensure that optional configuration with unmet dependencies is only
    // installed once all the dependencies are met.
    $this->assertNull($this->getStorage()->load('other_module_test_unmet'), 'The optional configuration config_test.dynamic.other_module_test_unmet whose dependencies are not met is not created.');
    $this->assertNull($this->getStorage()->load('other_module_test_optional_entity_unmet'), 'The optional configuration config_test.dynamic.other_module_test_optional_entity_unmet whose dependencies are not met is not created.');    $this->installModule('config_test_language');
    $this->assertNull($this->getStorage()->load('other_module_test_optional_entity_unmet'), 'The optional configuration config_test.dynamic.other_module_test_optional_entity_unmet whose dependencies are not met is not created.');
    $this->installModule('config_test_language');
    $this->assertNull($this->getStorage()->load('other_module_test_optional_entity_unmet'), 'The optional configuration config_test.dynamic.other_module_test_optional_entity_unmet whose dependencies are met is not created.');
    $this->installModule('config_install_dependency_test');
    $this->assertNotEmpty($this->getStorage()->load('other_module_test_unmet'), 'The optional configuration config_test.dynamic.other_module_test_unmet whose dependencies are met is now created.');
+2 −1
Original line number Diff line number Diff line
@@ -328,7 +328,8 @@ public function testGetDeleteRouteParameters() {
    $route_match = new RouteMatch('example', new Route('/test/{langcode}'), ['langcode' => 'xx']);
    $this->configNamesMapper->populateFromRouteMatch($route_match);

    $expected = ['langcode' => 'xx'];    $result = $this->configNamesMapper->getDeleteRouteParameters();
    $expected = ['langcode' => 'xx'];
    $result = $this->configNamesMapper->getDeleteRouteParameters();
    $this->assertSame($expected, $result);
  }