Completed
Pull Request — master (#16)
by Sergii
04:26
created
src/Context/RawTqContext.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     {
288 288
         // Obtain base URL when path is empty, or not starts from "//" or "http".
289 289
         if (empty($path) || strpos($path, '//') !== 0 && strpos($path, 'http') !== 0) {
290
-            $path = rtrim($this->getMinkParameter('base_url'), '/') . '/' . ltrim($path, '/');
290
+            $path = rtrim($this->getMinkParameter('base_url'), '/').'/'.ltrim($path, '/');
291 291
         }
292 292
 
293 293
         $url = parse_url($path);
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                 throw new \InvalidArgumentException(sprintf('%s is not valid scheme.', $url['scheme']));
304 304
             }
305 305
 
306
-            $path = $url['scheme'] . ':';
306
+            $path = $url['scheme'].':';
307 307
         } else {
308 308
             // Process "//" at the start.
309 309
             $path = '';
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
             // Encode special characters in username and password. Useful
316 316
             // when some item contain something like "@" symbol.
317 317
             foreach (['user' => ':', 'pass' => '@'] as $part => $suffix) {
318
-                $path .= rawurlencode($url[$part]) . $suffix;
318
+                $path .= rawurlencode($url[$part]).$suffix;
319 319
             }
320 320
         }
321 321
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         // Append additional URL components.
325 325
         foreach (['port' => ':', 'path' => '', 'query' => '?', 'fragment' => '#'] as $part => $prefix) {
326 326
             if (isset($url[$part])) {
327
-                $path .= $prefix . $url[$part];
327
+                $path .= $prefix.$url[$part];
328 328
             }
329 329
         }
330 330
 
Please login to merge, or discard this patch.
src/Utils/BaseEntity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,6 +73,6 @@
 block discarded – undo
73 73
             $operation = "/$operation";
74 74
         }
75 75
 
76
-        return $this->entityType() . "/$id$operation";
76
+        return $this->entityType()."/$id$operation";
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
src/Context/RawPageContext.php 1 patch
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.
src/Context/TqContext.php 1 patch
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.
src/Cores/DrupalKernelPlaceholder.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -91,6 +91,9 @@  discard block
 block discarded – undo
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());
@@ -237,6 +240,8 @@  discard block
 block discarded – undo
237 240
 
238 241
     /**
239 242
      * {@inheritdoc}
243
+     * @param string $type
244
+     * @param string $name
240 245
      */
241 246
     public static function drupalGetFilename($type, $name, $filename = null)
242 247
     {
@@ -245,6 +250,7 @@  discard block
 block discarded – undo
245 250
 
246 251
     /**
247 252
      * {@inheritdoc}
253
+     * @param string $path
248 254
      */
249 255
     public static function fileUnmanagedDelete($path)
250 256
     {
@@ -253,6 +259,8 @@  discard block
 block discarded – undo
253 259
 
254 260
     /**
255 261
      * {@inheritdoc}
262
+     * @param string $source
263
+     * @param string $destination
256 264
      */
257 265
     public static function fileUnmanagedCopy($source, $destination = null, $replace = FILE_EXISTS_RENAME)
258 266
     {
Please login to merge, or discard this patch.
src/Cores/Drupal8Placeholder.php 1 patch
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.
src/Cores/Drupal7Placeholder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     {
209 209
         $file .= '.js';
210 210
         $modulePath = static::drupalGetFilename('module', 'system');
211
-        $destination = dirname($modulePath) . '/' . $file;
211
+        $destination = dirname($modulePath).'/'.$file;
212 212
         $injection = "\ndrupal_add_js('$destination', array('every_page' => TRUE));";
213 213
 
214 214
         if ($delete) {
@@ -218,13 +218,13 @@  discard block
 block discarded – undo
218 218
             $replace = '';
219 219
         } else {
220 220
             static::fileUnmanagedCopy(
221
-                str_replace('Context', 'JavaScript', __DIR__) . '/' . $file,
221
+                str_replace('Context', 'JavaScript', __DIR__).'/'.$file,
222 222
                 $destination,
223 223
                 FILE_EXISTS_REPLACE
224 224
             );
225 225
 
226 226
             $search = 'system_add_module_assets();';
227
-            $replace = $search . $injection;
227
+            $replace = $search.$injection;
228 228
         }
229 229
 
230 230
         file_put_contents($modulePath, str_replace($search, $replace, file_get_contents($modulePath)));
Please login to merge, or discard this patch.