Completed
Pull Request — master (#16)
by Sergii
07:30
created
src/Context/RawTqContext.php 2 patches
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,6 +117,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Unused Use Statements   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,22 +11,22 @@
 block discarded – undo
11 11
 use Behat\Behat\Context\Exception\ContextNotFoundException;
12 12
 use Behat\DebugExtension\Debugger;
13 13
 // Helpers.
14
-use WebDriver\Session;
15
-use Drupal\Driver\DrushDriver;
16
-use Drupal\Driver\DriverInterface as DrupalDriverInterface;
17
-use Drupal\Component\Utility\Random;
18
-use Behat\Mink\Element\NodeElement;
14
+use Behat\Behat\Context\Environment\InitializedContextEnvironment;
15
+use Behat\Behat\Hook\Scope\StepScope;
16
+use Behat\Mink\Driver\DriverInterface as SessionDriverInterface;
19 17
 use Behat\Mink\Driver\GoutteDriver;
20 18
 use Behat\Mink\Driver\Selenium2Driver;
21
-use Behat\Mink\Driver\DriverInterface as SessionDriverInterface;
22
-use Behat\Behat\Hook\Scope\StepScope;
23
-use Behat\Behat\Context\Environment\InitializedContextEnvironment;
19
+use Behat\Mink\Element\NodeElement;
24 20
 use Behat\Testwork\Environment\Environment;
21
+use Drupal\Component\Utility\Random;
22
+use Drupal\Driver\DriverInterface as DrupalDriverInterface;
23
+use Drupal\Driver\DrushDriver;
24
+use WebDriver\Session;
25 25
 // Utils.
26
-use Drupal\TqExtension\Utils\Url;
27
-use Drupal\TqExtension\Utils\Tags;
28
-use Drupal\TqExtension\Utils\JavaScript;
29 26
 use Drupal\TqExtension\Cores\DrupalKernelPlaceholder;
27
+use Drupal\TqExtension\Utils\JavaScript;
28
+use Drupal\TqExtension\Utils\Tags;
29
+use Drupal\TqExtension\Utils\Url;
30 30
 
31 31
 /**
32 32
  * @see RawTqContext::__call()
Please login to merge, or discard this patch.
src/Cores/DrupalKernelPlaceholder.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -91,6 +91,9 @@
 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());
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -300,9 +300,9 @@
 block discarded – undo
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)));
Please login to merge, or discard this patch.
src/Cores/Drupal7Placeholder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Utils/JavaScript.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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));
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
             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
 }
Please login to merge, or discard this patch.
src/Utils/DatePicker/JQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.