@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function compile() |
32 | 32 | { |
33 | - $pharFilePath = dirname(__FILE__).'/../../build/monitor.phar'; |
|
33 | + $pharFilePath = dirname(__FILE__) . '/../../build/monitor.phar'; |
|
34 | 34 | if (file_exists($pharFilePath)) { |
35 | 35 | unlink($pharFilePath); |
36 | 36 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $phar->setSignatureAlgorithm(\Phar::SHA1); |
42 | 42 | |
43 | 43 | $phar->startBuffering(); |
44 | - $root = __DIR__.'/../..'; |
|
44 | + $root = __DIR__ . '/../..'; |
|
45 | 45 | |
46 | 46 | $finder = new Finder(); |
47 | 47 | $finder->files() |
@@ -52,33 +52,33 @@ discard block |
||
52 | 52 | ->exclude('Tests') |
53 | 53 | ->exclude('tests') |
54 | 54 | ->exclude('docs') |
55 | - ->in($root.'/src') |
|
56 | - ->in($root.'/vendor/guzzlehttp') |
|
57 | - ->in($root.'/vendor/eljam') |
|
58 | - ->in($root.'/vendor/hogosha') |
|
59 | - ->in($root.'/vendor/webmozart') |
|
60 | - ->in($root.'/vendor/psr') |
|
61 | - ->in($root.'/vendor/guzzle') |
|
62 | - ->in($root.'/vendor/symfony') |
|
55 | + ->in($root . '/src') |
|
56 | + ->in($root . '/vendor/guzzlehttp') |
|
57 | + ->in($root . '/vendor/eljam') |
|
58 | + ->in($root . '/vendor/hogosha') |
|
59 | + ->in($root . '/vendor/webmozart') |
|
60 | + ->in($root . '/vendor/psr') |
|
61 | + ->in($root . '/vendor/guzzle') |
|
62 | + ->in($root . '/vendor/symfony') |
|
63 | 63 | ; |
64 | 64 | |
65 | 65 | foreach ($finder as $file) { |
66 | 66 | $this->addFile($phar, $file); |
67 | 67 | } |
68 | 68 | |
69 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/autoload.php')); |
|
70 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_namespaces.php')); |
|
71 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_psr4.php')); |
|
72 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_classmap.php')); |
|
73 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_files.php')); |
|
74 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_real.php')); |
|
69 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/autoload.php')); |
|
70 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_namespaces.php')); |
|
71 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_psr4.php')); |
|
72 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_classmap.php')); |
|
73 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_files.php')); |
|
74 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/autoload_real.php')); |
|
75 | 75 | |
76 | - if (file_exists($root.'/vendor/composer/include_paths.php')) { |
|
77 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/include_paths.php')); |
|
76 | + if (file_exists($root . '/vendor/composer/include_paths.php')) { |
|
77 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/include_paths.php')); |
|
78 | 78 | } |
79 | - $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/ClassLoader.php')); |
|
79 | + $this->addFile($phar, new \SplFileInfo($root . '/vendor/composer/ClassLoader.php')); |
|
80 | 80 | |
81 | - $binContent = file_get_contents($root.'/bin/monitor'); |
|
81 | + $binContent = file_get_contents($root . '/bin/monitor'); |
|
82 | 82 | $binContent = preg_replace('{^#!/usr/bin/env php\s*}', '', $binContent); |
83 | 83 | $phar->addFromString('bin/monitor', $binContent); |
84 | 84 | |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | |
91 | 91 | protected function addFile(\Phar $phar, \SplFileInfo $file, $strip = true) |
92 | 92 | { |
93 | - $path = str_replace(dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR, '', $file->getRealPath()); |
|
93 | + $path = str_replace(dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR, '', $file->getRealPath()); |
|
94 | 94 | $content = file_get_contents($file); |
95 | 95 | if ($strip) { |
96 | 96 | $content = self::stripWhitespace($content); |
97 | 97 | } elseif ('LICENSE' === basename($file)) { |
98 | - $content = "\n".$content."\n"; |
|
98 | + $content = "\n" . $content . "\n"; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | if ($path === 'src/Monitor.php') { |