@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | if (empty($wysiwyg)) { |
32 | 32 | throw new \InvalidArgumentException( |
33 | - 'WYSIWYG name cannot be empty. You must mark your scenario with @wysiwyg' . |
|
33 | + 'WYSIWYG name cannot be empty. You must mark your scenario with @wysiwyg'. |
|
34 | 34 | 'and @wysiwyg:<NAME> tags. For example: @wysiwyg @wysiwyg:CKEditor' |
35 | 35 | ); |
36 | 36 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | return trim($this->getDrushDriver()->drush('uli', [ |
20 | 20 | $username, |
21 | 21 | '--browser=0', |
22 | - '--uri=' . $this->locatePath(), |
|
22 | + '--uri='.$this->locatePath(), |
|
23 | 23 | ])); |
24 | 24 | } |
25 | 25 | } |
@@ -26,6 +26,6 @@ |
||
26 | 26 | |
27 | 27 | return $this->getSession() |
28 | 28 | ->getPage() |
29 | - ->findAll('css', $selector = $this->getDrupalSelector($type . 'message_selector')); |
|
29 | + ->findAll('css', $selector = $this->getDrupalSelector($type.'message_selector')); |
|
30 | 30 | } |
31 | 31 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $formContext = $this->getFormContext(); |
65 | 65 | |
66 | 66 | foreach (['username', 'password'] as $prop) { |
67 | - $formContext->fillField($this->getDrupalText($prop . '_field'), $props[$prop]); |
|
67 | + $formContext->fillField($this->getDrupalText($prop.'_field'), $props[$prop]); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $this->getWorkingElement()->pressButton($this->getDrupalText('log_in')); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $minkContext = $this->getMinkContext(); |
155 | 155 | |
156 | 156 | foreach ($checkboxes->getRows() as $checkbox) { |
157 | - $minkContext->{trim($action) . 'Option'}(reset($checkbox)); |
|
157 | + $minkContext->{trim($action).'Option'}(reset($checkbox)); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | throw new \Exception('The "files_path" Mink parameter was not configured.'); |
248 | 248 | } |
249 | 249 | |
250 | - $file = rtrim(realpath($filesPath), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file; |
|
250 | + $file = rtrim(realpath($filesPath), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$file; |
|
251 | 251 | |
252 | 252 | if (!is_file($file)) { |
253 | 253 | throw new \InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | public function setConnection($email, $imap, $username, $password) |
20 | 20 | { |
21 | 21 | if (empty($this->connections[$email])) { |
22 | - $connection = imap_open('{' . $imap . '}INBOX', $username, $password); |
|
22 | + $connection = imap_open('{'.$imap.'}INBOX', $username, $password); |
|
23 | 23 | |
24 | 24 | if (false === $connection) { |
25 | 25 | throw new \RuntimeException('IMAP connection cannot be open. Maybe some parameters are incorrect.'); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 4 => 'imap_qprint', |
91 | 91 | ]; |
92 | 92 | |
93 | - return isset($process[$encoding]) ? $process[$encoding] : function ($string) { |
|
93 | + return isset($process[$encoding]) ? $process[$encoding] : function($string) { |
|
94 | 94 | return $string; |
95 | 95 | }; |
96 | 96 | } |
@@ -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 |
@@ -117,6 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | /** |
119 | 119 | * {@inheritdoc} |
120 | + * @param string $name |
|
120 | 121 | */ |
121 | 122 | public function getDrupalText($name) |
122 | 123 | { |
@@ -216,7 +217,7 @@ discard block |
||
216 | 217 | * @param array $args |
217 | 218 | * Placeholder declarations. |
218 | 219 | * |
219 | - * @return mixed |
|
220 | + * @return string |
|
220 | 221 | */ |
221 | 222 | public function executeJs($javascript, array $args = []) |
222 | 223 | { |
@@ -233,7 +234,7 @@ discard block |
||
233 | 234 | * |
234 | 235 | * @param StepScope $event |
235 | 236 | * |
236 | - * @return int |
|
237 | + * @return boolean |
|
237 | 238 | */ |
238 | 239 | public static function isStepImpliesJsEvent(StepScope $event) |
239 | 240 | { |
@@ -91,6 +91,9 @@ |
||
91 | 91 | self::requireContext(__FUNCTION__, func_get_args()); |
92 | 92 | } |
93 | 93 | |
94 | + /** |
|
95 | + * @param string $path |
|
96 | + */ |
|
94 | 97 | public static function setCurrentPath($path) |
95 | 98 | { |
96 | 99 | self::requireContext(__FUNCTION__, func_get_args()); |
@@ -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))); |