Issues (12)

src/Console/Commands/HasSuffixOption.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace LaraGeoData\Console\Commands;
4
5
use Illuminate\Support\Str;
6
7
trait HasSuffixOption
8
{
9
    /**
10
     * Get formatted suffix.
11
     *
12
     * @return string|null
13
     */
14 13
    protected function getSuffix(): ?string
15
    {
16 13
        $suffix = $this->option('suffix');
0 ignored issues
show
It seems like option() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        /** @scrutinizer ignore-call */ 
17
        $suffix = $this->option('suffix');
Loading history...
17 13
        if ($suffix) {
18 9
            $suffix = Str::snake($suffix);
19
        }
20
21 13
        return $suffix;
22
    }
23
}
24