Passed
Branch main (b90ec4)
by Thierry
20:23 queued 14:04
created

CreateAnnotationsDir   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
3
namespace App\Console\Commands;
4
5
use Illuminate\Console\Command;
6
7
use function file_exists;
8
use function mkdir;
9
use function storage_path;
10
11
class CreateAnnotationsDir extends Command
12
{
13
    /**
14
     * The name and signature of the console command.
15
     *
16
     * @var string
17
     */
18
    protected $signature = 'annotations:mkdir';
19
20
    /**
21
     * The console command description.
22
     *
23
     * @var string
24
     */
25
    protected $description = 'Create the cache dir for the Jaxon classes annotations';
26
27
    /**
28
     * Execute the console command.
29
     *
30
      * @return int
31
     */
32
    public function handle()
33
    {
34
        $path = storage_path('annotations');
35
        file_exists($path) || mkdir($path, 0755, false);
36
37
        return Command::SUCCESS;
38
    }
39
}
40