@@ -29,17 +29,17 @@ |
||
29 | 29 | { |
30 | 30 | $app = $this->app; |
31 | 31 | |
32 | - $app->singleton('easy-rsa.factory', static function () { |
|
32 | + $app->singleton('easy-rsa.factory', static function() { |
|
33 | 33 | return new Factory(); |
34 | 34 | }); |
35 | 35 | |
36 | - $app->singleton('easy-rsa', static function ($app) { |
|
36 | + $app->singleton('easy-rsa', static function($app) { |
|
37 | 37 | return new Manager($app, $app['easy-rsa.factory']); |
38 | 38 | }); |
39 | 39 | |
40 | 40 | $app->alias('easy-rsa', Manager::class); |
41 | 41 | |
42 | - $app->singleton(Worker::class, static function (Container $app) { |
|
42 | + $app->singleton(Worker::class, static function(Container $app) { |
|
43 | 43 | return $app->make('easy-rsa')->connection(); |
44 | 44 | }); |
45 | 45 | } |
@@ -2,21 +2,21 @@ |
||
2 | 2 | /* |
3 | 3 | Laravel 7 downloader and unpacker without external packages |
4 | 4 | */ |
5 | - $latestReleaseURL = 'https://api.github.com/repos/OpenVPN/easy-rsa/releases/latest'; |
|
6 | - $latestReleaseData = Http::get($latestReleaseURL)->json(); |
|
5 | + $latestReleaseURL = 'https://api.github.com/repos/OpenVPN/easy-rsa/releases/latest'; |
|
6 | + $latestReleaseData = Http::get($latestReleaseURL)->json(); |
|
7 | 7 | |
8 | - $gzArchivePath = storage_path ('app/bin/easy-rsa.tar.gz'); |
|
9 | - $tarArchivePath = substr ($gzArchivePath, 0, -3); |
|
10 | - $binPath = storage_path ('app/bin/'); |
|
8 | + $gzArchivePath = storage_path ('app/bin/easy-rsa.tar.gz'); |
|
9 | + $tarArchivePath = substr ($gzArchivePath, 0, -3); |
|
10 | + $binPath = storage_path ('app/bin/'); |
|
11 | 11 | |
12 | - // Gunzip |
|
13 | - $phar = new \PharData ($gzArchivePath); |
|
14 | - $phar->decompress (); |
|
12 | + // Gunzip |
|
13 | + $phar = new \PharData ($gzArchivePath); |
|
14 | + $phar->decompress (); |
|
15 | 15 | |
16 | - // Unpack |
|
17 | - $phar = new \PharData ($tarArchivePath); |
|
18 | - $phar->extractTo ($binPath); |
|
16 | + // Unpack |
|
17 | + $phar = new \PharData ($tarArchivePath); |
|
18 | + $phar->extractTo ($binPath); |
|
19 | 19 | |
20 | - // Rename |
|
21 | - rename ($binPath . $phar->getFilename(), $binPath . 'easy-rsa'); |
|
20 | + // Rename |
|
21 | + rename ($binPath . $phar->getFilename(), $binPath . 'easy-rsa'); |
|
22 | 22 | ?> |
@@ -5,18 +5,18 @@ |
||
5 | 5 | $latestReleaseURL = 'https://api.github.com/repos/OpenVPN/easy-rsa/releases/latest'; |
6 | 6 | $latestReleaseData = Http::get($latestReleaseURL)->json(); |
7 | 7 | |
8 | - $gzArchivePath = storage_path ('app/bin/easy-rsa.tar.gz'); |
|
9 | - $tarArchivePath = substr ($gzArchivePath, 0, -3); |
|
10 | - $binPath = storage_path ('app/bin/'); |
|
8 | + $gzArchivePath = storage_path('app/bin/easy-rsa.tar.gz'); |
|
9 | + $tarArchivePath = substr($gzArchivePath, 0, -3); |
|
10 | + $binPath = storage_path('app/bin/'); |
|
11 | 11 | |
12 | 12 | // Gunzip |
13 | - $phar = new \PharData ($gzArchivePath); |
|
14 | - $phar->decompress (); |
|
13 | + $phar = new \PharData($gzArchivePath); |
|
14 | + $phar->decompress(); |
|
15 | 15 | |
16 | 16 | // Unpack |
17 | - $phar = new \PharData ($tarArchivePath); |
|
18 | - $phar->extractTo ($binPath); |
|
17 | + $phar = new \PharData($tarArchivePath); |
|
18 | + $phar->extractTo($binPath); |
|
19 | 19 | |
20 | 20 | // Rename |
21 | - rename ($binPath . $phar->getFilename(), $binPath . 'easy-rsa'); |
|
21 | + rename($binPath . $phar->getFilename(), $binPath . 'easy-rsa'); |
|
22 | 22 | ?> |