Completed
Push — master ( 003f88...43488a )
by Daniel
04:26
created

PostAuthEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CodeCloud\Bundle\ShopifyBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Symfony\Component\HttpFoundation\Response;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\HttpFoundation\Response was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class PostAuthEvent extends Event
9
{
10
    const NAME = 'codecloud.shopify.post_auth';
11
12
    /**
13
     * @var string
14
     */
15
    private $shop;
16
17
    /**
18
     * @var string
19
     */
20
    private $accessToken;
21
22
    /**
23
     * @var Response
24
     */
25
    private $response;
26
27
    /**
28
     * @param string $shop
29
     * @param string $accessToken
30
     */
31
    public function __construct(string $shop, string $accessToken)
0 ignored issues
show
Unused Code introduced by
The parameter $accessToken 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

31
    public function __construct(string $shop, /** @scrutinizer ignore-unused */ string $accessToken)

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...
32
    {
33
        $this->shop = $shop;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getShop(): string
40
    {
41
        return $this->shop;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getAccessToken(): string
48
    {
49
        return $this->accessToken;
50
    }
51
52
    /**
53
     * @return Response
54
     */
55
    public function getResponse(): ?Response
56
    {
57
        return $this->response;
58
    }
59
60
    /**
61
     * @param Response $response
62
     * @return $this
63
     */
64
    public function setResponse(Response $response)
65
    {
66
        $this->response = $response;
67
68
        return $this;
69
    }
70
}
71