Completed
Push — master ( 33a55e...ca53a0 )
by Nils
07:47
created
src/Rules/Xml/Rss/ValidRule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     private function getSchema()
17 17
     {
18
-        return __DIR__ . '/' . self::SCHEMA;
18
+        return __DIR__.'/'.self::SCHEMA;
19 19
     }
20 20
 
21 21
     public function validate(ResponseInterface $response)
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
             $lastError = libxml_get_last_error();
33 33
             if ($lastError) {
34 34
                 throw new ValidationFailedException(
35
-                    'The given xml file is not well formed (last error: ' .
36
-                    str_replace("\n", '', $lastError->message) . ').');
35
+                    'The given xml file is not well formed (last error: '.
36
+                    str_replace("\n", '', $lastError->message).').');
37 37
             }
38 38
             $valid = @$dom->schemaValidate($this->getSchema());
39 39
             if (!$valid) {
40 40
                 $lastError = libxml_get_last_error();
41 41
                 $lastErrorMessage = str_replace("\n", '', $lastError->message);
42 42
                 throw new ValidationFailedException(
43
-                    'The given xml file did not Validate vs. ' .
44
-                    $this->getSchema() . ' (last error: ' .
45
-                    $lastErrorMessage . ').');
43
+                    'The given xml file did not Validate vs. '.
44
+                    $this->getSchema().' (last error: '.
45
+                    $lastErrorMessage.').');
46 46
             }
47 47
         }
48 48
     }
Please login to merge, or discard this patch.
src/Rules/Image/SizeRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
     protected function doValidation(ResponseInterface $response)
26 26
     {
27 27
         $size = strlen($response->getBody()) / 1000;
28
-        $this->assert($size <= $this->maxSize, 'The size of the file is too big (' . $size . ' KB)');
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/Http/Header/GZipRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         if ($response instanceof ContentTypeAwareResponse) {
25 25
             if (strpos($response->getContentType(), 'image') === false
26 26
                 && strpos($response->getContentType(), 'pdf') === false
27
-                && strlen((string)$response->getBody()) >= $this->minFileSize
27
+                && strlen((string) $response->getBody()) >= $this->minFileSize
28 28
             ) {
29 29
                 if (!$response->hasHeader('Content-Encoding') || $response->getHeader('Content-Encoding')[0] !== 'gzip') {
30 30
                     throw new ValidationFailedException('gzip compression not active');
Please login to merge, or discard this patch.
src/Rules/Http/Header/SuccessStatusRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function validate(ResponseInterface $response)
23 23
     {
24 24
         if ($response->getStatusCode() > $this->maxStatusCode) {
25
-            throw new ValidationFailedException('Status code ' . $response->getStatusCode() . ' found.');
25
+            throw new ValidationFailedException('Status code '.$response->getStatusCode().' found.');
26 26
         }
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
src/Rules/Http/Header/HttpStatusRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function validate(ResponseInterface $response)
27 27
     {
28 28
         if ($response->getStatusCode() !== $this->expectedStatus) {
29
-            throw new ValidationFailedException('Status code ' . $response->getStatusCode() . ' found, ' . $this->expectedStatus . ' expected.');
29
+            throw new ValidationFailedException('Status code '.$response->getStatusCode().' found, '.$this->expectedStatus.' expected.');
30 30
         }
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Rules/Http/DurationRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@
 block discarded – undo
29 29
             if ($response->getDuration() > $this->maxDuration) {
30 30
                 return new CheckResult(
31 31
                     CheckResult::STATUS_FAILURE,
32
-                    'The http request took ' . (int)$response->getDuration() . ' milliseconds (limit was ' . $this->maxDuration . 'ms).',
33
-                    (int)$response->getDuration());
32
+                    'The http request took '.(int) $response->getDuration().' milliseconds (limit was '.$this->maxDuration.'ms).',
33
+                    (int) $response->getDuration());
34 34
             }
35 35
 
36 36
             return new CheckResult(
37 37
                 CheckResult::STATUS_SUCCESS,
38
-                'The http request took ' . (int)$response->getDuration() . ' milliseconds.',
39
-                (int)$response->getDuration());
38
+                'The http request took '.(int) $response->getDuration().' milliseconds.',
39
+                (int) $response->getDuration());
40 40
         }
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
src/Rules/Html/InsecureContentRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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/StringExistsRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
     protected function doValidation(ResponseInterface $response)
26 26
     {
27 27
         $this->assert(strpos($response->getBody(), $this->string) !== false,
28
-            'The given string (' . $this->string . ') was not found in this document.');
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/SizeRule.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
     protected function doValidation(ResponseInterface $response)
27 27
     {
28 28
         $size = strlen($response->getBody()) / 1000;
29
-        $this->assert($size <= $this->maxSize, 'The size of this html file is too big (' . $size . ' KB)');
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.