Completed
Push — master ( d3eeb5...4b4eb0 )
by Nils
01:58
created
src/Rules/Html/RegExExistsRule.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
     protected $contentTypes = array('text/html', 'application/json', 'application/xml');
17 17
 
18 18
     /**
19
-     * @param int $string The string that the document must contain
20 19
      */
21 20
     public function init(array $regExs)
22 21
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
             if ($regEx['isRegEx']) {
43 43
                 $pattern = str_replace('', '\\~', $regEx['pattern']);
44 44
 
45
-                if (preg_match('~' . $pattern . '~', (string)$response->getBody()) === 0) {
46
-                    $errors[] = 'Regular expression: ' . $regEx['pattern'];
45
+                if (preg_match('~'.$pattern.'~', (string) $response->getBody()) === 0) {
46
+                    $errors[] = 'Regular expression: '.$regEx['pattern'];
47 47
                 }
48 48
             } else {
49
-                if (preg_match('^' . preg_quote($regEx['pattern']) . '^', (string)$response->getBody()) === 0) {
50
-                    $errors[] = 'Text: ' . $regEx['pattern'];
49
+                if (preg_match('^'.preg_quote($regEx['pattern']).'^', (string) $response->getBody()) === 0) {
50
+                    $errors[] = 'Text: '.$regEx['pattern'];
51 51
                 }
52 52
             }
53 53
         }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             $errorString = 'The following text elements were not found: <ul>';
57 57
 
58 58
             foreach ($errors as $error) {
59
-                $errorString .= '<li>' . $error . '</li>';
59
+                $errorString .= '<li>'.$error.'</li>';
60 60
             }
61 61
 
62 62
             $errorString .= '</ul>';
Please login to merge, or discard this patch.