@@ -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 | } |