Issues (5)

src/Commands/GenerateKeyCommand.php (1 issue)

Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LaravelFreelancerNL\LaravelIndexNow\Commands;
6
7
use Illuminate\Console\Command;
8
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
9
10
class GenerateKeyCommand extends Command
11
{
12
    public $signature = 'index-now:generate-key';
13
14
    public $description = 'Generate the key and key file required for index submissions.';
15
16 2
    public function handle(): int
17
    {
18 2
        $key = IndexNow::generateKey();
0 ignored issues
show
Bug Best Practice introduced by
The method LaravelFreelancerNL\Lara...IndexNow::generateKey() is not static, but was called statically. ( Ignorable by Annotation )

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

18
        /** @scrutinizer ignore-call */ 
19
        $key = IndexNow::generateKey();
Loading history...
19
20 2
        $this->info('The keyfile was generated. Please add the following key to your .env file:');
21 2
        $this->newLine();
22 2
        $this->info('INDEXNOW_KEY=' . $key);
23
24 2
        return self::SUCCESS;
25
    }
26
}
27