Completed
Push — master ( 483143...6b44c3 )
by Guillaume
05:17
created
src/Runner/Runner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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
                 ]
Please login to merge, or discard this patch.
src/Configuration/ConfigurationDumper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Configuration/ConfigurationLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Compiler/Compiler.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function compile()
21 21
     {
22
-        $pharFilePath = dirname(__FILE__).'/../../build/monitor.phar';
22
+        $pharFilePath = dirname(__FILE__) . '/../../build/monitor.phar';
23 23
         if (file_exists($pharFilePath)) {
24 24
             unlink($pharFilePath);
25 25
         }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $phar->setSignatureAlgorithm(\Phar::SHA1);
31 31
 
32 32
         $phar->startBuffering();
33
-        $root = __DIR__.'/../..';
33
+        $root = __DIR__ . '/../..';
34 34
 
35 35
         $finder = new Finder();
36 36
         $finder->files()
@@ -41,31 +41,31 @@  discard block
 block discarded – undo
41 41
             ->exclude('Tests')
42 42
             ->exclude('tests')
43 43
             ->exclude('docs')
44
-            ->in($root.'/src')
45
-            ->in($root.'/vendor/guzzlehttp')
46
-            ->in($root.'/vendor/webmozart')
47
-            ->in($root.'/vendor/psr')
48
-            ->in($root.'/vendor/guzzle')
49
-            ->in($root.'/vendor/symfony')
44
+            ->in($root . '/src')
45
+            ->in($root . '/vendor/guzzlehttp')
46
+            ->in($root . '/vendor/webmozart')
47
+            ->in($root . '/vendor/psr')
48
+            ->in($root . '/vendor/guzzle')
49
+            ->in($root . '/vendor/symfony')
50 50
         ;
51 51
 
52 52
         foreach ($finder as $file) {
53 53
             $this->addFile($phar, $file);
54 54
         }
55 55
 
56
-        $this->addFile($phar, new \SplFileInfo($root.'/vendor/autoload.php'));
57
-        $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_namespaces.php'));
58
-        $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_psr4.php'));
59
-        $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_classmap.php'));
60
-        $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_files.php'));
61
-        $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_real.php'));
56
+        $this->addFile($phar, new \SplFileInfo($root . '/vendor/autoload.php'));
57
+        $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_namespaces.php'));
58
+        $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_psr4.php'));
59
+        $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_classmap.php'));
60
+        $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_files.php'));
61
+        $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_real.php'));
62 62
 
63
-        if (file_exists($root.'/vendor/composer/include_paths.php')) {
64
-            $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/include_paths.php'));
63
+        if (file_exists($root . '/vendor/composer/include_paths.php')) {
64
+            $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/include_paths.php'));
65 65
         }
66
-        $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/ClassLoader.php'));
66
+        $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/ClassLoader.php'));
67 67
 
68
-        $binContent = file_get_contents($root.'/bin/monitor');
68
+        $binContent = file_get_contents($root . '/bin/monitor');
69 69
         $binContent = preg_replace('{^#!/usr/bin/env php\s*}', '', $binContent);
70 70
         $phar->addFromString('bin/monitor', $binContent);
71 71
 
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 
78 78
     protected function addFile(\Phar $phar, \SplFileInfo $file, $strip = true)
79 79
     {
80
-        $path = str_replace(dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR, '', $file->getRealPath());
80
+        $path = str_replace(dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR, '', $file->getRealPath());
81 81
         $content = file_get_contents($file);
82 82
         if ($strip) {
83 83
             $content = self::stripWhitespace($content);
84 84
         } elseif ('LICENSE' === basename($file)) {
85
-            $content = "\n".$content."\n";
85
+            $content = "\n" . $content . "\n";
86 86
         }
87 87
 
88 88
         if ($path === 'src/Monitor.php') {
Please login to merge, or discard this patch.
src/Console/MonitorApplicationConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,20 +38,20 @@
 block discarded – undo
38 38
 SIGNATURE;
39 39
 
40 40
         $this
41
-            ->setDisplayName($signature."\n".'Hogosha Monitoring Tool')
41
+            ->setDisplayName($signature . "\n" . 'Hogosha Monitoring Tool')
42 42
             ->setName('monitor')
43 43
             ->setVersion(Monitor::VERSION)
44 44
                 ->addOption('config', 'c', Option::OPTIONAL_VALUE, 'Config file path', rtrim(getcwd(), DIRECTORY_SEPARATOR))
45 45
                 ->beginCommand('init')
46 46
                     ->setDescription('Create a default configuration file if you do not have one')
47
-                    ->setHandler(function () use ($configurationLoader, $configurationDumper, $filesystem) {
47
+                    ->setHandler(function() use ($configurationLoader, $configurationDumper, $filesystem) {
48 48
                         return new InitHandler($configurationLoader, $configurationDumper, $filesystem);
49 49
                     })
50 50
                     ->setHelp('php <info>bin/monitor</info> init')
51 51
                 ->end()
52 52
                 ->beginCommand('run')
53 53
                     ->setDescription('Launch the monitor process')
54
-                    ->setHandler(function () use ($configurationLoader) {
54
+                    ->setHandler(function() use ($configurationLoader) {
55 55
                         return new RunHandler($configurationLoader);
56 56
                     })
57 57
                     ->setHelp('php <info>bin/monitor</info> init')
Please login to merge, or discard this patch.
src/Renderer/ListRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                     $result->getStatusCode(),
38 38
                     $result->getName(),
39 39
                     $result->getReponseTime()
40
-                )."\n"
40
+                ) . "\n"
41 41
             );
42 42
         }
43 43
     }
Please login to merge, or discard this patch.
tests/Handler/InitHandlerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function testExistingConfigurationFile()
26 26
     {
27
-        $file = sys_get_temp_dir().DIRECTORY_SEPARATOR.Monitor::CONFIG_FILENAME;
27
+        $file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . Monitor::CONFIG_FILENAME;
28 28
 
29 29
         // Dump the configuration set by the enduser
30 30
         $configuration = [
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $content = '';
43 43
         foreach ($configuration as $name => $section) {
44
-            $content .= Yaml::dump([$name => $section], 4).PHP_EOL;
44
+            $content .= Yaml::dump([$name => $section], 4) . PHP_EOL;
45 45
         }
46 46
 
47 47
         file_put_contents($file, $content);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function testDefaultConfigurationFile()
110 110
     {
111
-        $testFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.Monitor::CONFIG_FILENAME;
111
+        $testFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . Monitor::CONFIG_FILENAME;
112 112
 
113 113
         $configurationLoader = new ConfigurationLoader();
114 114
         $configurationDumper = new ConfigurationDumper();
Please login to merge, or discard this patch.