Completed
Push — master ( b2c110...4a91e8 )
by Nils
13s
created
src/Rules/Http/Header/ExistsRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
 
25 25
         foreach ($this->checkedHeaders as $headerConfig) {
26 26
             if (!$response->hasHeader($headerConfig['key'])) {
27
-                throw new ValidationFailedException('Header not found (' . $headerConfig['key'] . ')');
27
+                throw new ValidationFailedException('Header not found ('.$headerConfig['key'].')');
28 28
             }
29 29
 
30 30
             $currentValue = $response->getHeader($headerConfig['key'])[0];
31 31
 
32
-            if (!preg_match('^' . $headerConfig['value'] . '^', $currentValue, $matches)) {
33
-                throw new ValidationFailedException('Header "' . $headerConfig['key'] . '" does not match "' . $headerConfig['value'] . '". Current value is "' . $currentValue . '"');
32
+            if (!preg_match('^'.$headerConfig['value'].'^', $currentValue, $matches)) {
33
+                throw new ValidationFailedException('Header "'.$headerConfig['key'].'" does not match "'.$headerConfig['value'].'". Current value is "'.$currentValue.'"');
34 34
             }
35 35
         }
36 36
     }
Please login to merge, or discard this patch.