@@ -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 | ] |
@@ -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 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function testExistingConfigurationFile() |
26 | 26 | { |
27 | - $this->file = sys_get_temp_dir().DIRECTORY_SEPARATOR.Monitor::CONFIG_FILENAME; |
|
27 | + $this->file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . Monitor::CONFIG_FILENAME; |
|
28 | 28 | |
29 | 29 | // Dump the configuration set by the enduser |
30 | 30 | $configuration = [ |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $content = ''; |
51 | 51 | foreach ($configuration as $name => $section) { |
52 | - $content .= Yaml::dump([$name => $section], 4).PHP_EOL; |
|
52 | + $content .= Yaml::dump([$name => $section], 4) . PHP_EOL; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | file_put_contents($this->file, $content); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function testDefaultConfigurationFile() |
123 | 123 | { |
124 | - $testFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.Monitor::CONFIG_FILENAME; |
|
124 | + $testFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . Monitor::CONFIG_FILENAME; |
|
125 | 125 | |
126 | 126 | $configurationLoader = new ConfigurationLoader(); |
127 | 127 | $configurationDumper = new ConfigurationDumper(); |
@@ -40,20 +40,20 @@ |
||
40 | 40 | SIGNATURE; |
41 | 41 | |
42 | 42 | $this |
43 | - ->setDisplayName($signature."\n".'Irongate Monitor Application') |
|
43 | + ->setDisplayName($signature . "\n" . 'Irongate Monitor Application') |
|
44 | 44 | ->setName('monitor') |
45 | 45 | ->setVersion(Monitor::VERSION) |
46 | 46 | ->addOption('config', 'c', Option::OPTIONAL_VALUE, 'Config file path', rtrim(getcwd(), DIRECTORY_SEPARATOR)) |
47 | 47 | ->beginCommand('init') |
48 | 48 | ->setDescription('Create a default configuration file if you do not have one') |
49 | - ->setHandler(function () use ($configurationLoader, $configurationDumper, $filesystem) { |
|
49 | + ->setHandler(function() use ($configurationLoader, $configurationDumper, $filesystem) { |
|
50 | 50 | return new InitHandler($configurationLoader, $configurationDumper, $filesystem); |
51 | 51 | }) |
52 | 52 | ->setHelp('php <info>bin/monitor</info> init') |
53 | 53 | ->end() |
54 | 54 | ->beginCommand('run') |
55 | 55 | ->setDescription('Launch the monitor process') |
56 | - ->setHandler(function () use ($configurationLoader) { |
|
56 | + ->setHandler(function() use ($configurationLoader) { |
|
57 | 57 | return new RunHandler($configurationLoader); |
58 | 58 | }) |
59 | 59 | ->setHelp('php <info>bin/monitor</info> init') |