@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // Start with base URL when path is empty, or not starts from "//" or "http". |
| 38 | 38 | if (empty($path) || strpos($path, '//') !== 0 && strpos($path, 'http') !== 0) { |
| 39 | - $path = rtrim($baseUrl, '/') . '/' . trim($path, '/'); |
|
| 39 | + $path = rtrim($baseUrl, '/').'/'.trim($path, '/'); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $this->setUrl($path)->scheme()->credentials()->host()->components(); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | throw new \InvalidArgumentException(sprintf('%s - invalid scheme.', $this->components['scheme'])); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - $this->url = $this->components['scheme'] . '://'; |
|
| 90 | + $this->url = $this->components['scheme'].'://'; |
|
| 91 | 91 | |
| 92 | 92 | return $this; |
| 93 | 93 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | // Encode special characters in username and password. Useful |
| 104 | 104 | // when some item contain something like "@" symbol. |
| 105 | 105 | foreach (['user' => ':', 'pass' => '@'] as $part => $suffix) { |
| 106 | - $this->url .= rawurlencode($this->components[$part]) . $suffix; |
|
| 106 | + $this->url .= rawurlencode($this->components[$part]).$suffix; |
|
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | { |
| 132 | 132 | foreach (['port' => ':', 'path' => '', 'query' => '?', 'fragment' => '#'] as $part => $prefix) { |
| 133 | 133 | if (isset($this->components[$part])) { |
| 134 | - $this->url .= $prefix . $this->components[$part]; |
|
| 134 | + $this->url .= $prefix.$this->components[$part]; |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
@@ -221,8 +221,7 @@ |
||
| 221 | 221 | strpos($error->message, $message) === 0 && ('' === $file ?: strpos($error->location, $file) === 0), |
| 222 | 222 | $negate |
| 223 | 223 | )) { |
| 224 | - case 1: |
|
| 225 | - throw new \Exception(sprintf('The "%s" error found, but should not be.', $message)); |
|
| 224 | + case 1 : throw new \Exception(sprintf('The "%s" error found, but should not be.', $message)); |
|
| 226 | 225 | |
| 227 | 226 | case 2: |
| 228 | 227 | throw new \Exception(sprintf('The "%s" error not found, but should be.', $message)); |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | $entity = entity_create($entityType, $values); |
| 156 | 156 | |
| 157 | 157 | entity_save($entityType, $entity); |
| 158 | - list($entityId, , $bundle) = entity_extract_ids($entityType, $entity); |
|
| 158 | + list($entityId,, $bundle) = entity_extract_ids($entityType, $entity); |
|
| 159 | 159 | |
| 160 | 160 | return [$entityId, $entityType, $bundle]; |
| 161 | 161 | } |
@@ -300,9 +300,9 @@ |
||
| 300 | 300 | $replace = ''; |
| 301 | 301 | } else { |
| 302 | 302 | // Copy the file. |
| 303 | - copy(str_replace('Cores', 'JavaScript', __DIR__) . '/' . $file, $destination); |
|
| 303 | + copy(str_replace('Cores', 'JavaScript', __DIR__).'/'.$file, $destination); |
|
| 304 | 304 | // Find an unique line and append injection. |
| 305 | - $replace = $search . $injection; |
|
| 305 | + $replace = $search.$injection; |
|
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | file_put_contents($target, str_replace($search, $replace, file_get_contents($target))); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | static $files = []; |
| 24 | 24 | |
| 25 | 25 | if (empty($files[$filename])) { |
| 26 | - $path = str_replace('Utils', 'JavaScript', __DIR__) . "/$filename.js"; |
|
| 26 | + $path = str_replace('Utils', 'JavaScript', __DIR__)."/$filename.js"; |
|
| 27 | 27 | |
| 28 | 28 | if (!file_exists($path)) { |
| 29 | 29 | throw new \RuntimeException(sprintf('File "%s" does not exists!', $path)); |
@@ -211,7 +211,7 @@ |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | $selector = DrupalKernelPlaceholder::t($selector); |
| 214 | - $element = $this->{'find' . $map[$locator]}($selector); |
|
| 214 | + $element = $this->{'find'.$map[$locator]}($selector); |
|
| 215 | 215 | $this->throwNoSuchElementException($selector, $element); |
| 216 | 216 | |
| 217 | 217 | return $element; |
@@ -73,6 +73,6 @@ |
||
| 73 | 73 | throw new \RuntimeException('An ID cannot be zero.'); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - return $this->entityType() . "/$id$operation"; |
|
| 76 | + return $this->entityType()."/$id$operation"; |
|
| 77 | 77 | } |
| 78 | 78 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | */ |
| 84 | 84 | private function datePicker(array $arguments) |
| 85 | 85 | { |
| 86 | - return $this->jQuery(sprintf("datepicker(%s);", implode(', ', array_map(function ($value) { |
|
| 86 | + return $this->jQuery(sprintf("datepicker(%s);", implode(', ', array_map(function($value) { |
|
| 87 | 87 | return in_array($value, ['<date>']) ? $this->jsDate : "'$value'"; |
| 88 | 88 | }, $arguments)))); |
| 89 | 89 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | if (DRUPAL_CORE < 8) { |
| 65 | 65 | $autocomplete_selector = 'autocomplete'; |
| 66 | 66 | $autocomplete = $field->getParent()->findById($autocomplete_selector); |
| 67 | - $autocomplete_selector = '#' . $autocomplete_selector; |
|
| 67 | + $autocomplete_selector = '#'.$autocomplete_selector; |
|
| 68 | 68 | } else { |
| 69 | 69 | $autocomplete_selector = 'body > .ui-widget-content.ui-autocomplete'; |
| 70 | 70 | $autocomplete = $this->element('css', $autocomplete_selector); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $minkContext = $this->getMinkContext(); |
| 171 | 171 | |
| 172 | 172 | foreach ($checkboxes->getRows() as $checkbox) { |
| 173 | - $minkContext->{trim($action) . 'Option'}(reset($checkbox)); |
|
| 173 | + $minkContext->{trim($action).'Option'}(reset($checkbox)); |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | throw new \Exception('The "files_path" Mink parameter was not configured.'); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | - $file = rtrim(realpath($filesPath), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file; |
|
| 266 | + $file = rtrim(realpath($filesPath), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$file; |
|
| 267 | 267 | |
| 268 | 268 | if (!is_file($file)) { |
| 269 | 269 | throw new \InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); |