@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | if (count($duplicatedIds) > 0) { |
38 | 38 | unset($duplicatedIds['']); |
39 | - throw new ValidationFailedException('Duplicate ids found (' . implode(', ', array_keys($duplicatedIds)) . ')'); |
|
39 | + throw new ValidationFailedException('Duplicate ids found ('.implode(', ', array_keys($duplicatedIds)).')'); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | private function getSchema() |
17 | 17 | { |
18 | - return __DIR__ . '/' . self::SCHEMA; |
|
18 | + return __DIR__.'/'.self::SCHEMA; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function validate(Response $response) |
@@ -32,17 +32,17 @@ discard block |
||
32 | 32 | $lastError = libxml_get_last_error(); |
33 | 33 | if ($lastError) { |
34 | 34 | throw new ValidationFailedException( |
35 | - 'The given xml file is not well formed (last error: ' . |
|
36 | - str_replace("\n", '', $lastError->message) . ').'); |
|
35 | + 'The given xml file is not well formed (last error: '. |
|
36 | + str_replace("\n", '', $lastError->message).').'); |
|
37 | 37 | } |
38 | 38 | $valid = @$dom->schemaValidate($this->getSchema()); |
39 | 39 | if (!$valid) { |
40 | 40 | $lastError = libxml_get_last_error(); |
41 | 41 | $lastErrorMessage = str_replace("\n", '', $lastError->message); |
42 | 42 | throw new ValidationFailedException( |
43 | - 'The given xml file did not Validate vs. ' . |
|
44 | - $this->getSchema() . ' (last error: ' . |
|
45 | - $lastErrorMessage . ').'); |
|
43 | + 'The given xml file did not Validate vs. '. |
|
44 | + $this->getSchema().' (last error: '. |
|
45 | + $lastErrorMessage.').'); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | } |
@@ -25,6 +25,6 @@ |
||
25 | 25 | protected function doValidation(Response $response) |
26 | 26 | { |
27 | 27 | $size = strlen($response->getBody()) / 1000; |
28 | - $this->assert($size <= $this->maxSize, 'The size of the file is too big (' . $size . ' KB)'); |
|
28 | + $this->assert($size <= $this->maxSize, 'The size of the file is too big ('.$size.' KB)'); |
|
29 | 29 | } |
30 | 30 | } |
@@ -31,6 +31,6 @@ |
||
31 | 31 | |
32 | 32 | $imageHash = md5($response->getBody()); |
33 | 33 | |
34 | - $this->assert(!array_key_exists($imageHash, $this->favicons), 'Seems like you use the standard favicon of your framework (' . $this->favicons[$imageHash] . ').'); |
|
34 | + $this->assert(!array_key_exists($imageHash, $this->favicons), 'Seems like you use the standard favicon of your framework ('.$this->favicons[$imageHash].').'); |
|
35 | 35 | } |
36 | 36 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | while ($parent = $parent->parentNode) { |
37 | 37 | if (property_exists($parent, 'tagName')) { |
38 | - $fullPath = $parent->tagName . '/' . $fullPath; |
|
38 | + $fullPath = $parent->tagName.'/'.$fullPath; |
|
39 | 39 | } else { |
40 | 40 | break; |
41 | 41 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | $result = json_decode($response->getBody()); |
29 | 29 | if ($result === null) { |
30 | - throw new ValidationFailedException("The given JSON data can not be validated (last error: '" . $this->json_errors[json_last_error()] . "')."); |
|
30 | + throw new ValidationFailedException("The given JSON data can not be validated (last error: '".$this->json_errors[json_last_error()]."')."); |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | } |
@@ -37,15 +37,15 @@ |
||
37 | 37 | |
38 | 38 | foreach ($rules as $name => $rule) { |
39 | 39 | $info = Init::getInitInformationByClass(get_class($rule)); |
40 | - $output->writeln(' ' . $name . ':'); |
|
41 | - $output->writeln(' class: ' . get_class($rule)); |
|
42 | - $output->writeln(' description: ' . str_replace("\n", "\n ", $info['documentation'])); |
|
40 | + $output->writeln(' '.$name.':'); |
|
41 | + $output->writeln(' class: '.get_class($rule)); |
|
42 | + $output->writeln(' description: '.str_replace("\n", "\n ", $info['documentation'])); |
|
43 | 43 | |
44 | 44 | if (count($info['parameters']) > 0) { |
45 | 45 | $output->writeln(' parameter:'); |
46 | 46 | |
47 | 47 | foreach ($info['parameters'] as $parameter) { |
48 | - $output->writeln(' ' . $parameter['name'] . ': ' . $parameter['description'] . ' (default: ' . $parameter['default'] . ')'); |
|
48 | + $output->writeln(' '.$parameter['name'].': '.$parameter['description'].' (default: '.$parameter['default'].')'); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | */ |
46 | 46 | protected function writeSmokeCredentials($url = null) |
47 | 47 | { |
48 | - $this->output->writeln("\n Smoke " . SMOKE_VERSION . " by Nils Langner\n"); |
|
48 | + $this->output->writeln("\n Smoke ".SMOKE_VERSION." by Nils Langner\n"); |
|
49 | 49 | |
50 | 50 | if ($url) { |
51 | - $this->output->writeln(' <info>Scanning ' . $url . "</info>\n"); |
|
51 | + $this->output->writeln(' <info>Scanning '.$url."</info>\n"); |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | if (file_exists($configFile)) { |
108 | 108 | $fileContent = file_get_contents($configFile); |
109 | 109 | } else { |
110 | - throw new \RuntimeException("Config file was not found ('" . $configFile . "')."); |
|
110 | + throw new \RuntimeException("Config file was not found ('".$configFile."')."); |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | $configArray = EnvAwareYaml::parse($fileContent); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | private function initConfiguration($num_urls, $run_level, Uri $uri, Dispatcher $dispatcher) |
55 | 55 | { |
56 | - $configArray = $this->getConfigArray(__DIR__ . '/../../settings/' . self::CONFIG_FILE); |
|
56 | + $configArray = $this->getConfigArray(__DIR__.'/../../settings/'.self::CONFIG_FILE); |
|
57 | 57 | |
58 | 58 | $config = new Configuration($uri, $dispatcher, $configArray); |
59 | 59 |