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

CleanLastId   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 28
ccs 9
cts 9
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A title() 0 3 1
A estimate() 0 3 1
A handle() 0 4 1
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