Test Failed
Pull Request — master (#157)
by
unknown
09:19 queued 03:14
created

CleanLastId::estimate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Matchish\ScoutElasticSearch\Jobs\Stages;
4
5
use Elasticsearch\Client;
6
use Illuminate\Support\Facades\Cache;
7
use Matchish\ScoutElasticSearch\Searchable\ImportSource;
8
9
/**
10
 * @internal
11
 */
12
final class CleanLastId
13
{
14
    /**
15
     * @var ImportSource
16
     */
17
    private $source;
0 ignored issues
show
introduced by
The private property $source is not used, and could be removed.
Loading history...
18
19
    /**
20
     * @param ImportSource $source
21
     */
22 15
    public function __construct()
23
    {
24 15
    }
25
26 13
    public function handle(Client $elasticsearch): void
0 ignored issues
show
Unused Code introduced by
The parameter $elasticsearch is not used and could be removed. ( Ignorable by Annotation )

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

26
    public function handle(/** @scrutinizer ignore-unused */ Client $elasticsearch): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
27
    {
28
        // Clean Last id
29 13
        Cache::forget('scout_import_last_id');
30 13
    }
31
32 13
    public function title(): string
33
    {
34 13
        return 'Clean Last Id';
35
    }
36
37 13
    public function estimate(): int
38
    {
39 13
        return 1;
40
    }
41
}
42