Completed
Push — master ( 88b32b...6161b2 )
by Nils
04:31
created
src/Rules/Html/SizeRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     protected function doValidation(ResponseInterface $response)
27 27
     {
28
-        $size = strlen((string)$response->getBody()) / 1000;
29
-        $this->assert($size <= $this->maxSize, 'The size of this html file is too big (' . $size . ' KB)');
28
+        $size = strlen((string) $response->getBody()) / 1000;
29
+        $this->assert($size <= $this->maxSize, 'The size of this html file is too big ('.$size.' KB)');
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/Rules/Html/StringNotExistsRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     public function doValidation(ResponseInterface $response)
26 26
     {
27
-        $this->assert(strpos((string)$response->getBody(), $this->string) !== false,
28
-            'The given string (' . $this->string . ') was found in this document.');
27
+        $this->assert(strpos((string) $response->getBody(), $this->string) !== false,
28
+            'The given string ('.$this->string.') was found in this document.');
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
src/Rules/Html/StringExistsRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     protected function doValidation(ResponseInterface $response)
26 26
     {
27
-        $this->assert(strpos((string)$response->getBody(), $this->string) !== false,
28
-            'The given string (' . $this->string . ') was not found in this document.');
27
+        $this->assert(strpos((string) $response->getBody(), $this->string) !== false,
28
+            'The given string ('.$this->string.') was not found in this document.');
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
src/Rules/Html/InsecureContentRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
             return;
28 28
         }
29 29
 
30
-        $htmlDocument = new Document((string)$response->getBody());
30
+        $htmlDocument = new Document((string) $response->getBody());
31 31
 
32 32
         $resources = $htmlDocument->getDependencies($uri, false);
33 33
 
34 34
         foreach ($resources as $resource) {
35 35
             if ($resource->getScheme() && 'https' !== $resource->getScheme()) {
36
-                throw new ValidationFailedException('At least one dependency was found on a secure url, that was transfered insecure (' . (string)$resource . ')');
36
+                throw new ValidationFailedException('At least one dependency was found on a secure url, that was transfered insecure ('.(string) $resource.')');
37 37
             }
38 38
         }
39 39
     }
Please login to merge, or discard this patch.
src/Rules/Html/NoIndexRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             return;
21 21
         }
22 22
 
23
-        $crawler = new Crawler((string)$response->getBody());
23
+        $crawler = new Crawler((string) $response->getBody());
24 24
         $metaTags = $crawler->filterXPath("//meta[@name='robots']/@content");
25 25
 
26 26
         foreach ($metaTags as $metaTag) {
Please login to merge, or discard this patch.
src/Rules/Js/SyntaxRule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@
 block discarded – undo
30 30
             return;
31 31
         }
32 32
 
33
-        $filename = $this->tmpDir . DIRECTORY_SEPARATOR . md5((string)$response->getBody()) . '.js';
34
-        file_put_contents($filename, (string)$response->getBody());
35
-        $conf = __DIR__ . DIRECTORY_SEPARATOR . 'jsHint.conf';
33
+        $filename = $this->tmpDir.DIRECTORY_SEPARATOR.md5((string) $response->getBody()).'.js';
34
+        file_put_contents($filename, (string) $response->getBody());
35
+        $conf = __DIR__.DIRECTORY_SEPARATOR.'jsHint.conf';
36 36
 
37
-        $command = $this->jsHintExecutable . ' --config ' . $conf . ' --verbose ' . $filename . ' | grep -E E[0-9]+.$';
37
+        $command = $this->jsHintExecutable.' --config '.$conf.' --verbose '.$filename.' | grep -E E[0-9]+.$';
38 38
         $validationResult = shell_exec($command);
39 39
 
40 40
         unlink($filename);
41 41
 
42 42
         if (!is_null($validationResult)) {
43
-            $errorMsg = str_replace($filename . ':', '', $validationResult);
44
-            throw new ValidationFailedException('JavaScript error found: ' . $errorMsg);
43
+            $errorMsg = str_replace($filename.':', '', $validationResult);
44
+            throw new ValidationFailedException('JavaScript error found: '.$errorMsg);
45 45
         }
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
src/Rules/Image/FavIconRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
             return;
31 31
         }
32 32
 
33
-        $imageHash = md5((string)$response->getBody());
33
+        $imageHash = md5((string) $response->getBody());
34 34
 
35
-        $this->assert(!array_key_exists($imageHash, $this->favicons), 'Seems like you use the standard favicon of your framework (' . $this->favicons[$imageHash] . ').');
35
+        $this->assert(!array_key_exists($imageHash, $this->favicons), 'Seems like you use the standard favicon of your framework ('.$this->favicons[$imageHash].').');
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
src/Rules/Image/SizeRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     protected function doValidation(ResponseInterface $response)
26 26
     {
27
-        $size = strlen((string)$response->getBody()) / 1000;
28
-        $this->assert($size <= $this->maxSize, 'The size of the file is too big (' . $size . ' KB)');
27
+        $size = strlen((string) $response->getBody()) / 1000;
28
+        $this->assert($size <= $this->maxSize, 'The size of the file is too big ('.$size.' KB)');
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
src/Rules/Security/PasswordSecureTransferRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function doValidation(ResponseInterface $response)
21 21
     {
22
-        $crawler = new Crawler((string)$response->getBody());
22
+        $crawler = new Crawler((string) $response->getBody());
23 23
         $actionNodes = $crawler->filterXPath('//form[//input[@type="password"]]');
24 24
 
25
-        $url = (string)$response->getUri();
25
+        $url = (string) $response->getUri();
26 26
 
27 27
         foreach ($actionNodes as $node) {
28 28
             $action = $node->getAttribute('action');
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
             while ($parent = $parent->parentNode) {
38 38
                 if (property_exists($parent, 'tagName')) {
39
-                    $fullPath = $parent->tagName . '/' . $fullPath;
39
+                    $fullPath = $parent->tagName.'/'.$fullPath;
40 40
                 } else {
41 41
                     break;
42 42
                 }
Please login to merge, or discard this patch.