Completed
Pull Request — master (#16)
by Sergii
07:37
created
src/Context/Wysiwyg/RawWysiwygContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Context/Drush/RawDrushContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Context/Message/RawMessageContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Context/User/RawUserContext.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
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'));
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     public function getCurrentId()
31 31
     {
32 32
         $currentUser = $this
33
-          ->getUserManager()
34
-          ->getCurrentUser();
33
+            ->getUserManager()
34
+            ->getCurrentUser();
35 35
 
36 36
         return empty($currentUser->uid) ? 0 : $currentUser->uid;
37 37
     }
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 
118 118
         $account = user_load_by_name($props['username']);
119 119
         $this
120
-          ->getUserManager()
121
-          ->setCurrentUser($account);
120
+            ->getUserManager()
121
+            ->setCurrentUser($account);
122 122
 
123 123
         DrupalKernelPlaceholder::setCurrentUser($account);
124 124
     }
Please login to merge, or discard this patch.
src/Utils/Imap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Context/RawPageContext.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 // Helpers.
12 12
 use Behat\Mink\Element\NodeElement;
13 13
 // Utils.
14
-use Drupal\TqExtension\Utils\XPath;
15 14
 use Drupal\TqExtension\Cores\DrupalKernelPlaceholder;
15
+use Drupal\TqExtension\Utils\XPath;
16 16
 
17 17
 class RawPageContext extends RawDrupalContext
18 18
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Context/TqContext.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 // Scope definitions.
8 8
 use Behat\Behat\Hook\Scope;
9 9
 // Utils.
10
+use Drupal\TqExtension\Cores\DrupalKernelPlaceholder;
10 11
 use Drupal\TqExtension\Utils\Database\Database;
11 12
 use Drupal\TqExtension\Utils\LogicalAssertion;
12
-use Drupal\TqExtension\Cores\DrupalKernelPlaceholder;
13 13
 
14 14
 class TqContext extends RawTqContext
15 15
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -221,8 +221,7 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
src/Cores/Drupal8Placeholder.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
         static $original = 'php_mail';
166 166
 
167 167
         $systemMail = \Drupal::configFactory()
168
-          ->getEditable('system.mail');
168
+            ->getEditable('system.mail');
169 169
 
170 170
         if ($useTesting) {
171 171
             // Store original mail system to restore it after scenario.
Please login to merge, or discard this patch.
Unused Use Statements   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
 namespace Drupal\TqExtension\Cores;
6 6
 
7 7
 use Behat\Behat\Hook\Scope\BeforeFeatureScope;
8
-use Drupal\Core\Field\FieldDefinitionInterface;
9
-use Drupal\Core\Entity\FieldableEntityInterface;
10
-use Drupal\Core\Session\AccountInterface;
8
+use Drupal\Component\Render\FormattableMarkup;
9
+use Drupal\Component\Serialization\Json;
11 10
 use Drupal\Core\Database\Database;
12 11
 use Drupal\Core\Database\Query\Select;
12
+use Drupal\Core\Entity\FieldableEntityInterface;
13
+use Drupal\Core\Field\FieldDefinitionInterface;
14
+use Drupal\Core\Session\AccountInterface;
13 15
 use Drupal\Core\StringTranslation\TranslatableMarkup;
14
-use Drupal\Component\Render\FormattableMarkup;
15
-use Drupal\Component\Serialization\Json;
16 16
 use Drupal\TqExtension\Utils\Database\FetchField;
17 17
 
18 18
 final class Drupal8Placeholder extends DrupalKernelPlaceholder
Please login to merge, or discard this patch.
src/Utils/Url.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.