@@ -40,14 +40,12 @@ discard block |
||
| 40 | 40 | if (is_array($value)) { |
| 41 | 41 | if ($this->isAssociative($value)) { |
| 42 | 42 | $output = array_merge($output, $this->doEncode($value, $keys)); |
| 43 | - } |
|
| 44 | - else { |
|
| 43 | + } else { |
|
| 45 | 44 | foreach ($value as $j) { |
| 46 | 45 | $output[] = $this->keysToString($keys) . '[] = ' . $j; |
| 47 | 46 | } |
| 48 | 47 | } |
| 49 | - } |
|
| 50 | - else { |
|
| 48 | + } else { |
|
| 51 | 49 | $output[] = $this->keysToString($keys) . ' = ' . $value; |
| 52 | 50 | } |
| 53 | 51 | |
@@ -70,8 +68,7 @@ discard block |
||
| 70 | 68 | $head = array_shift($keys); |
| 71 | 69 | if ($keys) { |
| 72 | 70 | return $head . '[' . implode('][', $keys) . ']'; |
| 73 | - } |
|
| 74 | - else { |
|
| 71 | + } else { |
|
| 75 | 72 | return $head; |
| 76 | 73 | } |
| 77 | 74 | } |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | foreach ($arguments as $argument) { |
| 54 | 54 | if ($argument{0} == '-') { |
| 55 | 55 | $task->rawArg($argument); |
| 56 | - } |
|
| 57 | - else { |
|
| 56 | + } else { |
|
| 58 | 57 | $feature = "tests/features/$argument"; |
| 59 | 58 | |
| 60 | 59 | if (file_exists("$feature.feature")) { |
@@ -126,8 +126,7 @@ |
||
| 126 | 126 | $coordinates = $this->getSetting('show_coordinates'); |
| 127 | 127 | if ($coordinates) { |
| 128 | 128 | $summary[] = $this->t('Coordinates are shown'); |
| 129 | - } |
|
| 130 | - else { |
|
| 129 | + } else { |
|
| 131 | 130 | $summary[] = $this->t('Coordinates are hidden'); |
| 132 | 131 | } |
| 133 | 132 | |
@@ -112,8 +112,7 @@ discard block |
||
| 112 | 112 | $name = 'drupal'; |
| 113 | 113 | } |
| 114 | 114 | $info['projects'][$name] = $this->buildProject($package); |
| 115 | - } |
|
| 116 | - elseif ($this->isLightning($package)) { |
|
| 115 | + } elseif ($this->isLightning($package)) { |
|
| 117 | 116 | $info['projects'][$name] = $this->buildProject($package); |
| 118 | 117 | |
| 119 | 118 | // The Lightning project uses semantic versioning. |
@@ -283,8 +282,7 @@ discard block |
||
| 283 | 282 | 'type' => 'get', |
| 284 | 283 | 'url' => $package['dist']['url'], |
| 285 | 284 | ]; |
| 286 | - } |
|
| 287 | - else { |
|
| 285 | + } else { |
|
| 288 | 286 | $download = [ |
| 289 | 287 | 'type' => 'git', |
| 290 | 288 | 'url' => str_replace('[email protected]:', 'https://github.com/', $package['source']['url']), |
@@ -102,8 +102,7 @@ discard block |
||
| 102 | 102 | $this->ensureMyTable(); |
| 103 | 103 | if (is_array($this->value)) { |
| 104 | 104 | $location = $this->value[0]; |
| 105 | - } |
|
| 106 | - else { |
|
| 105 | + } else { |
|
| 107 | 106 | $location = $this->value; |
| 108 | 107 | } |
| 109 | 108 | |
@@ -151,8 +150,7 @@ discard block |
||
| 151 | 150 | foreach ($options as $key => $option) { |
| 152 | 151 | if (is_numeric($option)) { |
| 153 | 152 | $formula = str_replace(':' . $key, $option, $formula); |
| 154 | - } |
|
| 155 | - else { |
|
| 153 | + } else { |
|
| 156 | 154 | $formula = str_replace(':' . $key, $connection->escapeField($option), $formula); |
| 157 | 155 | } |
| 158 | 156 | } |
@@ -14,18 +14,15 @@ |
||
| 14 | 14 | $build = []; |
| 15 | 15 | if ($this->currentUser()->isAnonymous()) { |
| 16 | 16 | $build['form'] = $this->formBuilder()->getForm(UserLoginForm::class); |
| 17 | - } |
|
| 18 | - else { |
|
| 17 | + } else { |
|
| 19 | 18 | if (\Drupal::moduleHandler()->moduleExists('moderation_dashboard') |
| 20 | 19 | && $this->currentUser()->hasPermission('use moderation dashboard')) { |
| 21 | 20 | // Permitted users are directed to their moderation dashboard. |
| 22 | 21 | return $this->redirect('page_manager.page_view_moderation_dashboard_moderation_dashboard-panels_variant-0', ['user' => $this->currentUser()->id()]); |
| 23 | - } |
|
| 24 | - elseif ($this->currentUser()->hasPermission('access content overview')) { |
|
| 22 | + } elseif ($this->currentUser()->hasPermission('access content overview')) { |
|
| 25 | 23 | // Permitted users are directed to the admin content page. |
| 26 | 24 | return $this->redirect('view.content.page_1'); |
| 27 | - } |
|
| 28 | - else { |
|
| 25 | + } else { |
|
| 29 | 26 | $build['heading'] = [ |
| 30 | 27 | '#type' => 'markup', |
| 31 | 28 | '#markup' => $this->t('This site has no homepage content.'), |