Test Failed
Pull Request — master (#157)
by
unknown
14:40
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 Elasticsearch\Common\Exceptions\Missing404Exception;
7
use Illuminate\Support\Facades\Cache;
8
use Matchish\ScoutElasticSearch\ElasticSearch\Params\Indices\Alias\Get as GetAliasParams;
9
use Matchish\ScoutElasticSearch\ElasticSearch\Params\Indices\Delete as DeleteIndexParams;
10
use Matchish\ScoutElasticSearch\Searchable\ImportSource;
11
12
/**
13
 * @internal
14
 */
15
final class CleanLastId
16
{
17
    /**
18
     * @var ImportSource
19
     */
20
    private $source;
0 ignored issues
show
introduced by
The private property $source is not used, and could be removed.
Loading history...
21
22
    /**
23
     * @param ImportSource $source
24
     */
25 15
    public function __construct()
26
    {
27
28 15
    }
29
30 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

30
    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...
31
    {
32
        // Clean Last id
33 13
        Cache::forget('scout_import_last_id');
34 13
    }
35
36 13
    public function title(): string
37
    {
38 13
        return 'Clean Last Id';
39
    }
40
41 13
    public function estimate(): int
42
    {
43 13
        return 1;
44
    }
45
}
46