Version::get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Sfneal\Cruise\Commands;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Contracts\Console\PromptsForMissingInput;
7
8
class Version extends Command implements PromptsForMissingInput
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'version';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Display the application version';
23
24
    /**
25
     * Execute the console command.
26
     */
27
    public function handle(): int
28
    {
29
        $this->info('v'.self::get());
30
31
        return self::SUCCESS;
32
    }
33
34
    public static function get(): string
35
    {
36
        return file_get_contents(base_path('version.txt'));
37
    }
38
}
39