Completed
Push — master ( a686cc...2fd5d6 )
by Nils
05:13
created
src/Config/Configuration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     private function initConfigArray(array $configArray, array $defaultSettings = null)
47 47
     {
48 48
         if ($defaultSettings === null) {
49
-            $defaultSettings = Yaml::parse(file_get_contents(__DIR__ . '/../settings/' . self::DEFAULT_SETTINGS));
49
+            $defaultSettings = Yaml::parse(file_get_contents(__DIR__.'/../settings/'.self::DEFAULT_SETTINGS));
50 50
         }
51 51
 
52 52
         if (count($configArray) === 0) {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         if ($this->hasSection($section)) {
127 127
             return $this->configArray[$section];
128 128
         } else {
129
-            throw new \RuntimeException('The section (' . $section . ') you are trying to access does not exist.');
129
+            throw new \RuntimeException('The section ('.$section.') you are trying to access does not exist.');
130 130
         }
131 131
     }
132 132
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         if (array_key_exists($name, $this->extensions)) {
136 136
             return $this->extensions[$name];
137 137
         } else {
138
-            throw new \RuntimeException('The extension ("' . $name . '") you are trying to access does not exist. Registered extensions are: ' . implode(' ,', array_keys($this->extensions)) . '.');
138
+            throw new \RuntimeException('The extension ("'.$name.'") you are trying to access does not exist. Registered extensions are: '.implode(' ,', array_keys($this->extensions)).'.');
139 139
         }
140 140
     }
141 141
 
Please login to merge, or discard this patch.
src/Extensions/SmokeStop/StopExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         if (array_key_exists($name, $this->stopStrategies)) {
45 45
             return $this->stopStrategies[$name];
46 46
         } else {
47
-            throw new \RuntimeException("Strategy ('" . $name . "') not found. Available strategies are " . implode(', ', array_keys($this->stopStrategies)));
47
+            throw new \RuntimeException("Strategy ('".$name."') not found. Available strategies are ".implode(', ', array_keys($this->stopStrategies)));
48 48
         }
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Extensions/SmokeReporter/Reporter/XUnitReporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
                     $testCase->addFailure(new Failure($ruleName, $message));
83 83
 
84 84
                     if ($this->retriever instanceof CrawlingRetriever) {
85
-                        $stackTrace = $result->getUrl() . ' coming from ' . (string) $this->retriever->getComingFrom($result->getUrl()) . PHP_EOL;
86
-                        $stackTrace .= '    - ' . $message . " [rule: $ruleName]";
85
+                        $stackTrace = $result->getUrl().' coming from '.(string) $this->retriever->getComingFrom($result->getUrl()).PHP_EOL;
86
+                        $stackTrace .= '    - '.$message." [rule: $ruleName]";
87 87
                         $testCase->setSystemOut($stackTrace);
88 88
                     }
89 89
                 }
@@ -94,6 +94,6 @@  discard block
 block discarded – undo
94 94
 
95 95
         file_put_contents($this->filename, $xUnitReport->toXml());
96 96
 
97
-        $this->output->writeln('    <info>Writing XUnit Output to file:</info> ' . $this->filename);
97
+        $this->output->writeln('    <info>Writing XUnit Output to file:</info> '.$this->filename);
98 98
     }
99 99
 }
Please login to merge, or discard this patch.
src/Rules/Html/RegExNotExistsRule.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
     protected $contentTypes = array('text/html');
16 16
 
17 17
     /**
18
-     * @param int $string The string that the document must contain
19 18
      */
20 19
     public function init(array $regExs)
21 20
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
     protected function doValidation(Response $response)
26 26
     {
27 27
         foreach ($this->regExs as $regEx) {
28
-            $this->assert(preg_match('^' . $regEx . '^', (string) $response->getBody()) === 0,
29
-                'The given regular expression (' . $regEx . ') was found in this document.');
28
+            $this->assert(preg_match('^'.$regEx.'^', (string) $response->getBody()) === 0,
29
+                'The given regular expression ('.$regEx.') was found in this document.');
30 30
         }
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Rules/Http/HttpsRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         $sslOptions = stream_context_create(array('ssl' => array('capture_peer_cert' => true)));
30 30
 
31 31
         $request = stream_socket_client(
32
-            'ssl://' . $host . ':443',
32
+            'ssl://'.$host.':443',
33 33
             $errno,
34 34
             $errstr,
35 35
             30,
Please login to merge, or discard this patch.
src/Extensions/SmokeFilter/FilterExtension.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
     public function init($filters = array(), $filterFile = '', $exclusive = array())
42 42
     {
43 43
         if (count($exclusive) > 0 && (count($filters) > 0 || $filterFile !== '')) {
44
-            throw new \RuntimeException("It's not possible to define filter lists and an exclusive list at the same time [Extension: " . get_class($this) . '].');
44
+            throw new \RuntimeException("It's not possible to define filter lists and an exclusive list at the same time [Extension: ".get_class($this).'].');
45 45
         }
46 46
 
47 47
         if ($filterFile !== '') {
48 48
             if (!file_exists($filterFile)) {
49
-                throw new \RuntimeException('Filter file not found: ' . $filterFile);
49
+                throw new \RuntimeException('Filter file not found: '.$filterFile);
50 50
             }
51 51
 
52 52
             $filterElements = EnvAwareYaml::parse(file_get_contents($filterFile));
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function isFiltered(Event $event, $ruleName, Response $response)
87 87
     {
88
-        $uri = (string)$this->retriever->getOriginUri($response->getUri());
88
+        $uri = (string) $this->retriever->getOriginUri($response->getUri());
89 89
 
90 90
         if ($this->currentModus === self::MODUS_FILTER) {
91 91
             $isFiltered = $this->isFilteredByFilter($ruleName, $uri);
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     private function isFilteredByFilter($ruleName, $uri)
106 106
     {
107 107
         foreach ($this->filters as $filter) {
108
-            if ($ruleName === $filter['rule'] && 0 < preg_match('$' . $filter['uri'] . '$', $uri)) {
108
+            if ($ruleName === $filter['rule'] && 0 < preg_match('$'.$filter['uri'].'$', $uri)) {
109 109
                 return true;
110 110
             }
111 111
         }
Please login to merge, or discard this patch.
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.
src/Rules/Xml/XmlCheckRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
         if (!$success) {
22 22
             $lastError = libxml_get_last_error();
23 23
 
24
-            throw new ValidationFailedException('The xml file ' . $response->getUri() . ' is not well formed (last error: ' .
25
-                str_replace("\n", '', $lastError->message) . ').');
24
+            throw new ValidationFailedException('The xml file '.$response->getUri().' is not well formed (last error: '.
25
+                str_replace("\n", '', $lastError->message).').');
26 26
         }
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
src/Rules/Xml/Sitemap/ValidRule.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
     private function getSchema($isIndex)
30 30
     {
31 31
         if ($isIndex) {
32
-            return __DIR__ . '/' . self::INDEX;
32
+            return __DIR__.'/'.self::INDEX;
33 33
         }
34 34
 
35 35
         if ($this->strictMode) {
36
-            return __DIR__ . '/' . self::SCHEMA;
36
+            return __DIR__.'/'.self::SCHEMA;
37 37
         } else {
38
-            return __DIR__ . '/' . self::NON_STRICT_SCHEMA;
38
+            return __DIR__.'/'.self::NON_STRICT_SCHEMA;
39 39
         }
40 40
     }
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if (!$valid) {
50 50
             $lastError = libxml_get_last_error();
51 51
             throw new ValidationFailedException(
52
-                'The given sitemap file (' . $filename . ') did not validate against the sitemap schema (last error: ' . str_replace("\n", '', $lastError->message) . ').');
52
+                'The given sitemap file ('.$filename.') did not validate against the sitemap schema (last error: '.str_replace("\n", '', $lastError->message).').');
53 53
         }
54 54
     }
55 55
 
Please login to merge, or discard this patch.
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@  discard block
 block discarded – undo
26 26
         $this->strictMode = $strictMode;
27 27
     }
28 28
 
29
+    /**
30
+     * @param boolean $isIndex
31
+     */
29 32
     private function getSchema($isIndex)
30 33
     {
31 34
         if ($isIndex) {
@@ -39,6 +42,10 @@  discard block
 block discarded – undo
39 42
         }
40 43
     }
41 44
 
45
+    /**
46
+     * @param \Psr\Http\Message\StreamInterface $body
47
+     * @param string $filename
48
+     */
42 49
     private function validateBody($body, $filename, $isIndex = true)
43 50
     {
44 51
         $dom = new \DOMDocument();
Please login to merge, or discard this patch.