@@ -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 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | */ |
| 57 | 57 | private function initConfiguration(Uri $uri, Dispatcher $dispatcher) |
| 58 | 58 | { |
| 59 | - $configArray = $this->getConfigArray(__DIR__ . '/../../settings/warmup.yml'); |
|
| 59 | + $configArray = $this->getConfigArray(__DIR__.'/../../settings/warmup.yml'); |
|
| 60 | 60 | |
| 61 | 61 | $config = new Configuration($uri, $dispatcher, $configArray); |
| 62 | 62 | |
@@ -46,7 +46,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -53,20 +53,20 @@ |
||
| 53 | 53 | /* @var \Ivory\HttpAdapter\HttpAdapterException $exception */ |
| 54 | 54 | |
| 55 | 55 | $mainUri = $request->getUri(); |
| 56 | - $this->redirects[(string) $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl] = (string) $mainUri; |
|
| 56 | + $this->redirects[(string) $mainUri->getScheme().'://'.$mainUri->getHost().$corruptUrl] = (string) $mainUri; |
|
| 57 | 57 | |
| 58 | - $this->urls[] = ['url' => $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl, 'system' => $url['system']]; |
|
| 59 | - $this->urlStack[] = ['url' => $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl, 'system' => $url['system']]; |
|
| 58 | + $this->urls[] = ['url' => $mainUri->getScheme().'://'.$mainUri->getHost().$corruptUrl, 'system' => $url['system']]; |
|
| 59 | + $this->urlStack[] = ['url' => $mainUri->getScheme().'://'.$mainUri->getHost().$corruptUrl, 'system' => $url['system']]; |
|
| 60 | 60 | |
| 61 | 61 | return $this->next(); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | // the error handling should be done withing the calling class |
| 65 | - echo "\n " . $exception->getMessage() . "\n"; |
|
| 65 | + echo "\n ".$exception->getMessage()."\n"; |
|
| 66 | 66 | |
| 67 | 67 | return $this->next(); |
| 68 | 68 | } else { |
| 69 | - $errorMessages .= $exception->getMessage() . "\n"; |
|
| 69 | + $errorMessages .= $exception->getMessage()."\n"; |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | if ($errorMessages !== '') { |
@@ -44,7 +44,7 @@ |
||
| 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 | } |