@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Monitor\Renderer\RendererFactory; |
6 | 6 | use Monitor\Runner\Runner; |
7 | -use Webmozart\Console\Adapter\IOOutput; |
|
8 | 7 | use Webmozart\Console\Api\Args\Args; |
9 | 8 | use Webmozart\Console\Api\Command\Command; |
10 | 9 | use Webmozart\Console\Api\IO\IO; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * getUrls. |
30 | - * @return array |
|
30 | + * @return UrlInfo[] |
|
31 | 31 | */ |
32 | 32 | public function getUrls() |
33 | 33 | { |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $url->getUrl(), |
45 | 45 | [ |
46 | 46 | 'timeout' => $url->getTimeout(), |
47 | - 'on_stats' => function (TransferStats $tranferStats) use (&$stats, $url) { |
|
47 | + 'on_stats' => function(TransferStats $tranferStats) use (&$stats, $url) { |
|
48 | 48 | $stats[$url->getName()]['total_time'] = $tranferStats->getHandlerStats()['total_time']; |
49 | 49 | }, |
50 | 50 | ] |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Hogosha\Monitor\Configuration\ConfigurationDumper; |
6 | 6 | use Hogosha\Monitor\Configuration\ConfigurationLoader; |
7 | 7 | use Hogosha\Monitor\Console\Handler\InitHandler; |
8 | -use Hogosha\Monitor\DependencyInjection\Exception\ConfigurationLoadingException; |
|
9 | 8 | use Hogosha\Monitor\Monitor; |
10 | 9 | use Prophecy\Argument; |
11 | 10 | use Prophecy\type; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function testExistingConfigurationFile() |
27 | 27 | { |
28 | 28 | |
29 | - $this->file = sys_get_temp_dir().DIRECTORY_SEPARATOR.Monitor::CONFIG_FILENAME; |
|
29 | + $this->file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . Monitor::CONFIG_FILENAME; |
|
30 | 30 | |
31 | 31 | // Dump the configuration set by the enduser |
32 | 32 | $configuration = [ |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | |
52 | 52 | $content = ''; |
53 | 53 | foreach ($configuration as $name => $section) { |
54 | - $content .= Yaml::dump([$name => $section], 4).PHP_EOL; |
|
54 | + $content .= Yaml::dump([$name => $section], 4) . PHP_EOL; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | file_put_contents($this->file, $content); |
58 | 58 | |
59 | 59 | //Test if the enduser configuration is kept by the ConfigurationLoader |
60 | - $configurationLoader = new ConfigurationLoader( |
|
60 | + $configurationLoader = new ConfigurationLoader( |
|
61 | 61 | sys_get_temp_dir(), |
62 | 62 | Monitor::CONFIG_FILENAME |
63 | 63 | ); |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function testDefaultConfigurationFile() |
124 | 124 | { |
125 | - $testFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.'.test.yml'; |
|
125 | + $testFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . '.test.yml'; |
|
126 | 126 | |
127 | - $configurationLoader = new ConfigurationLoader( |
|
127 | + $configurationLoader = new ConfigurationLoader( |
|
128 | 128 | sys_get_temp_dir(), |
129 | 129 | '.test.yml' |
130 | 130 | ); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | $content = ''; |
19 | 19 | foreach ($config as $name => $section) { |
20 | - $content .= Yaml::dump([$name => $section], 4).PHP_EOL; |
|
20 | + $content .= Yaml::dump([$name => $section], 4) . PHP_EOL; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | return $content; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | */ |
67 | 67 | public function getConfigurationFilepath() |
68 | 68 | { |
69 | - return $this->configFilepath ?: $this->rootDirectory.DIRECTORY_SEPARATOR.$this->filename; |
|
69 | + return $this->configFilepath ?: $this->rootDirectory . DIRECTORY_SEPARATOR . $this->filename; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | parent::configure(); |
28 | 28 | |
29 | - $configurationLoader = new ConfigurationLoader( |
|
29 | + $configurationLoader = new ConfigurationLoader( |
|
30 | 30 | rtrim(getcwd(), DIRECTORY_SEPARATOR), |
31 | 31 | Monitor::CONFIG_FILENAME |
32 | 32 | ); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | SIGNATURE; |
50 | 50 | |
51 | 51 | $this |
52 | - ->setDisplayName($signature."\n".'Irongate Monitor Application') |
|
52 | + ->setDisplayName($signature . "\n" . 'Irongate Monitor Application') |
|
53 | 53 | ->setName('monitor') |
54 | 54 | ->setVersion(Monitor::VERSION) |
55 | 55 | ->beginCommand('init') |