@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | if ($result->isFailure()) { |
56 | 56 | if (array_key_exists($ruleKey, $result->getMessages())) { |
57 | 57 | $messages = $result->getMessages(); |
58 | - $failedUrls[] = (string) $result->getUrl() . ' - ' . $messages[$ruleKey]; |
|
58 | + $failedUrls[] = (string) $result->getUrl().' - '.$messages[$ruleKey]; |
|
59 | 59 | ++$count; |
60 | 60 | } |
61 | 61 | if ($count > $this->maxResults) { |
62 | - $failedUrls[] = '... only the first ' . $this->maxResults . ' elements are shown.'; |
|
62 | + $failedUrls[] = '... only the first '.$this->maxResults.' elements are shown.'; |
|
63 | 63 | break; |
64 | 64 | } |
65 | 65 | } |
@@ -77,15 +77,15 @@ discard block |
||
77 | 77 | $failedUrls = $this->getFailedUrls($ruleKey); |
78 | 78 | |
79 | 79 | if (count($failedUrls) > 0) { |
80 | - $this->output->writeln(' <error> ' . get_class($rule) . ' </error>'); |
|
80 | + $this->output->writeln(' <error> '.get_class($rule).' </error>'); |
|
81 | 81 | } else { |
82 | - $this->output->writeln(' <info> ' . get_class($rule) . ' </info>'); |
|
82 | + $this->output->writeln(' <info> '.get_class($rule).' </info>'); |
|
83 | 83 | } |
84 | 84 | |
85 | - $this->output->writeln(' ' . str_replace("\n", "\n ", $info['documentation']) . "\n"); |
|
85 | + $this->output->writeln(' '.str_replace("\n", "\n ", $info['documentation'])."\n"); |
|
86 | 86 | |
87 | 87 | foreach ($failedUrls as $failedUrl) { |
88 | - $this->output->writeln(' - ' . $failedUrl); |
|
88 | + $this->output->writeln(' - '.$failedUrl); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $this->output->writeln(''); |
@@ -18,13 +18,13 @@ |
||
18 | 18 | public function processResult(Result $result) |
19 | 19 | { |
20 | 20 | ++$this->urlCount; |
21 | - $this->output->writeln(' ' . $result->getUrl()); |
|
21 | + $this->output->writeln(' '.$result->getUrl()); |
|
22 | 22 | $this->output->writeln(''); |
23 | 23 | } |
24 | 24 | |
25 | 25 | public function finish() |
26 | 26 | { |
27 | - $this->output->writeln(' <comment>Warm up finished. ' . $this->urlCount . ' urls visited.</comment>'); |
|
27 | + $this->output->writeln(' <comment>Warm up finished. '.$this->urlCount.' urls visited.</comment>'); |
|
28 | 28 | $this->output->writeln(''); |
29 | 29 | } |
30 | 30 | } |
@@ -82,8 +82,8 @@ discard block |
||
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 |
||
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 | } |
@@ -30,15 +30,15 @@ |
||
30 | 30 | |
31 | 31 | protected function renderFailure(Result $result) |
32 | 32 | { |
33 | - $this->output->writeln(' <error> ' . $result->getUrl() . ' </error> coming from ' . (string) $this->retriever->getComingFrom($result->getUrl())); |
|
33 | + $this->output->writeln(' <error> '.$result->getUrl().' </error> coming from '.(string) $this->retriever->getComingFrom($result->getUrl())); |
|
34 | 34 | foreach ($result->getMessages() as $ruleName => $message) { |
35 | - $this->output->writeln(' - ' . $message . " [rule: $ruleName]"); |
|
35 | + $this->output->writeln(' - '.$message." [rule: $ruleName]"); |
|
36 | 36 | } |
37 | 37 | $this->output->writeln(''); |
38 | 38 | } |
39 | 39 | |
40 | 40 | protected function renderSuccess(Result $result) |
41 | 41 | { |
42 | - $this->output->writeln(' <info> ' . $result->getUrl() . ' </info> all tests passed'); |
|
42 | + $this->output->writeln(' <info> '.$result->getUrl().' </info> all tests passed'); |
|
43 | 43 | } |
44 | 44 | } |
@@ -31,15 +31,15 @@ |
||
31 | 31 | |
32 | 32 | if ($xpath['relation'] = 'equals') { |
33 | 33 | $result = $count === $xpath['value']; |
34 | - $message = 'The xpath "' . $xpath['pattern'] . '" was found ' . $count . ' times. Expected were exact ' . $xpath['value'] . ' occurencies.'; |
|
34 | + $message = 'The xpath "'.$xpath['pattern'].'" was found '.$count.' times. Expected were exact '.$xpath['value'].' occurencies.'; |
|
35 | 35 | } elseif ($xpath['relation'] === 'less than') { |
36 | 36 | $result = $count < $xpath['value']; |
37 | - $message = 'The xpath "' . $xpath['pattern'] . '" was found ' . $count . ' times. Expected were less than ' . $xpath['value'] . '.'; |
|
37 | + $message = 'The xpath "'.$xpath['pattern'].'" was found '.$count.' times. Expected were less than '.$xpath['value'].'.'; |
|
38 | 38 | } elseif ($xpath['relation'] === 'greater than') { |
39 | 39 | $result = $count > $xpath['value']; |
40 | - $message = 'The xpath "' . $xpath['pattern'] . '" was found ' . $count . ' times. Expected were more than ' . $xpath['value'] . '.'; |
|
40 | + $message = 'The xpath "'.$xpath['pattern'].'" was found '.$count.' times. Expected were more than '.$xpath['value'].'.'; |
|
41 | 41 | } else { |
42 | - throw new \RuntimeException('Relation not defined. Given "' . $xpath['relation'] . '" expected [equals, greater than, less than]'); |
|
42 | + throw new \RuntimeException('Relation not defined. Given "'.$xpath['relation'].'" expected [equals, greater than, less than]'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | $this->assert($result, $message); |
@@ -15,7 +15,6 @@ |
||
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 | { |
@@ -25,8 +25,8 @@ |
||
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 | } |
@@ -26,10 +26,10 @@ |
||
26 | 26 | $validTo = date('d.m.Y H:i:s', $certInfo['validTo_time_t']); |
27 | 27 | |
28 | 28 | if ($certInfo['validFrom_time_t'] > time() || $certInfo['validTo_time_t'] < time()) { |
29 | - $errorMessage = 'Certificate is expired. [' . $validFrom . ' - ' . $validTo . ']'; |
|
29 | + $errorMessage = 'Certificate is expired. ['.$validFrom.' - '.$validTo.']'; |
|
30 | 30 | throw new ValidationFailedException($errorMessage); |
31 | - } elseif ($certInfo['validTo_time_t'] < strtotime('+' . $this->expireWarningTime . 'days')) { |
|
32 | - $errorMessage = 'Certificate warning, expires in less than ' . $this->expireWarningTime . ' days. Certificate expires at: ' . $validTo; |
|
31 | + } elseif ($certInfo['validTo_time_t'] < strtotime('+'.$this->expireWarningTime.'days')) { |
|
32 | + $errorMessage = 'Certificate warning, expires in less than '.$this->expireWarningTime.' days. Certificate expires at: '.$validTo; |
|
33 | 33 | throw new ValidationFailedException($errorMessage); |
34 | 34 | } |
35 | 35 |
@@ -29,7 +29,7 @@ |
||
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, |
@@ -23,10 +23,10 @@ |
||
23 | 23 | { |
24 | 24 | if (array_key_exists('issuer', $certInfo) and array_key_exists('CN', $certInfo['issuer'])) { |
25 | 25 | if ($certInfo['issuer']['CN'] != $this->authorityName) { |
26 | - throw new ValidationFailedException('Expected authority was "' . $this->authorityName . '", "' . $certInfo['issuer']['CN'] . '" found.'); |
|
26 | + throw new ValidationFailedException('Expected authority was "'.$this->authorityName.'", "'.$certInfo['issuer']['CN'].'" found.'); |
|
27 | 27 | } |
28 | 28 | } else { |
29 | - throw new ValidationFailedException('Expected authority was "' . $this->authorityName . '". No authority found.'); |
|
29 | + throw new ValidationFailedException('Expected authority was "'.$this->authorityName.'". No authority found.'); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | } |