Passed
Push — master ( b0fbbb...e842b7 )
by Jeroen
01:46
created
src/CssFilters/NthFilter.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,13 +21,15 @@
 block discarded – undo
21 21
     public function filterNodes(Crawler $crawler): ?Crawler {
22 22
 
23 23
         // Nth needs one parameter
24
-        if (count($this->parameters) === 0)
25
-            throw new \ErrorException(':nth(x) css selector should have at least one parameter');
24
+        if (count($this->parameters) === 0) {
25
+                    throw new \ErrorException(':nth(x) css selector should have at least one parameter');
26
+        }
26 27
 
27 28
         // If not enough nodes in the list, return null
28 29
         $count = intval($this->parameters[0]);
29
-        if ($crawler->count() < $count)
30
-            return null;
30
+        if ($crawler->count() < $count) {
31
+                    return null;
32
+        }
31 33
 
32 34
         // Get the nth element
33 35
         return $crawler->eq($count - 1);
Please login to merge, or discard this patch.
src/WebClient.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,12 +27,10 @@
 block discarded – undo
27 27
         {
28 28
             $guzzleClient = new GuzzleClient($client);
29 29
             $goutteClient->setClient($guzzleClient);
30
-        }
31
-        elseif (is_a($client, GuzzleClient::class))
30
+        } elseif (is_a($client, GuzzleClient::class))
32 31
         {
33 32
             $goutteClient->setClient($client);
34
-        }
35
-        else
33
+        } else
36 34
         {
37 35
             // Unknow parmeter type or null, use default configuration
38 36
             $this->getClient();
Please login to merge, or discard this patch.