ClearProcessorCacheCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace Digia\Lumen\GraphQL\Commands;
4
5
use Digia\Lumen\GraphQL\GraphQLService;
6
use Illuminate\Console\Command;
7
8
class ClearProcessorCacheCommand extends Command
9
{
10
11
    /**
12
     * @var string
13
     */
14
    protected $signature = 'graphql:clear:processor:cache';
15
16
    /**
17
     * @var string
18
     */
19
    protected $description = 'Clears the GraphQL processor cache';
20
21
    /**
22
     * @var GraphQLService
23
     */
24
    private $graphqlService;
25
26
    /**
27
     * ClearProcessorCacheCommand constructor.
28
     *
29
     * @param GraphQLService $graphqlService
30
     */
31
    public function __construct(GraphQLService $graphqlService)
32
    {
33
        parent::__construct();
34
        
35
        $this->graphqlService = $graphqlService;
36
    }
37
38
    /**
39
     * @inheritDoc
40
     */
41
    public function handle()
42
    {
43
        $this->graphqlService->forgetProcessor();
44
    }
45
}
46