Notification Setup Error

We have detected an error in your notification set-up (Event-ID dab39dc24f564ec7bd4628d1305fd03c). Currently, we cannot inform you about inspection progress. Please check that the user 557058:bca11929-8c2d-43f2-8a82-c5416880d395 still has access to your repository or update the API account.

Completed
Push — develop ( a55da1...39a772 )
by
unknown
27:43 queued 12:35
created

HistoryPlugin   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getLastRequest() 0 4 1
A getLastResponse() 0 4 1
A addSuccess() 0 5 1
1
<?php
2
3
namespace Bitbucket\API\Http\Plugin;
4
5
use Http\Client\Common\Plugin\Journal;
6
use Psr\Http\Message\RequestInterface;
7
use Psr\Http\Message\ResponseInterface;
8
9
class HistoryPlugin implements Journal
10
{
11
    use HistoryVersionBridge;
12
13
    /** @var RequestInterface */
14
    private $lastRequest;
15
    /** @var ResponseInterface */
16
    private $lastResponse;
17
18
    /**
19
     * @return RequestInterface|null
20
     */
21
    public function getLastRequest()
22
    {
23
        return $this->lastRequest;
24
    }
25
26
    /**
27
     * @return ResponseInterface|null
28
     */
29
    public function getLastResponse()
30
    {
31
        return $this->lastResponse;
32
    }
33
34
    public function addSuccess(RequestInterface $request, ResponseInterface $response)
35
    {
36
        $this->lastRequest = $request;
37
        $this->lastResponse = $response;
38
    }
39
}
40