GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

PostTransactionEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 48
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTransaction() 0 3 1
A setTransaction() 0 3 1
A getServiceName() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace EightPoints\Bundle\GuzzleBundle\Events;
4
5
use Psr\Http\Message\ResponseInterface;
6
7
class PostTransactionEvent extends Event
8
{
9
    /** @var \Psr\Http\Message\ResponseInterface|null */
10
    protected $response;
11
12
    /** @var string */
13
    protected $serviceName;
14
15
    /**
16
     * @param \Psr\Http\Message\ResponseInterface|null $response
17
     * @param string $serviceName
18
     */
19
    public function __construct(?ResponseInterface $response, string $serviceName)
20
    {
21
        $this->response = $response;
22
        $this->serviceName = $serviceName;
23
    }
24
25
    /**
26
     * Get the transaction from the event.
27
     *
28
     * This returns the transaction we are working with.
29
     *
30
     * @return \Psr\Http\Message\ResponseInterface|null
31
     */
32
    public function getTransaction() : ?ResponseInterface
33
    {
34
        return $this->response;
35
    }
36
37
    /**
38
     * Sets the transaction inline with the event.
39
     *
40
     * @param \Psr\Http\Message\ResponseInterface|null $response
41
     *
42
     * @return void
43
     */
44
    public function setTransaction(?ResponseInterface $response) : void
45
    {
46
        $this->response = $response;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getServiceName() : string
53
    {
54
        return $this->serviceName;
55
    }
56
}
57