Test Failed
Push — stable ( 169703...de20f1 )
by Nuno
01:49
created

Installer::install()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 2
dl 0
loc 16
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace LaravelZero\Framework\Commands\Component\Illuminate\filesystem;
4
5
use LaravelZero\Framework\Commands\Component\Installer as InstallCommand;
6
use LaravelZero\Framework\Contracts\Providers\Composer as ComposerContract;
7
use LaravelZero\Framework\Contracts\Commands\Component\Installer as InstallerContract;
8
9
/**
10
 * This is the Zero Framework illuminate/filesystem install class.
11
 *
12
 * @author Nuno Maduro <[email protected]>
13
 */
14
class Installer implements InstallerContract
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function install(InstallCommand $command, ComposerContract $composer): bool
20
    {
21
        $command->info('Pulling illuminate/filesystem...');
22
        $composer->require('illuminate/filesystem "5.5.*"');
23
24
        $command->info('Component installed! Usage:');
25
        $command->comment('
26
27
use Illuminate\Support\Facades\File;
28
29
File::put("file.txt", "Thank you for considering Laravel Zero.");
30
31
        ');
32
33
        return true;
34
    }
35
}
36