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.
Completed
Pull Request — master (#3)
by
unknown
02:19
created

InMemoryRecorder::clear()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Http\Client\Plugin\Vcr\Recorder;
6
7
use Psr\Http\Message\ResponseInterface;
8
9
/**
10
 * Store responses in memory.
11
 *
12
 * @author Gary PEGEOT <[email protected]>
13
 */
14
final class InMemoryRecorder implements PlayerInterface, RecorderInterface
15
{
16
    /**
17
     * @var ResponseInterface[]
18
     */
19
    private $responses = [];
20
21 4
    public function replay(string $name): ?ResponseInterface
22
    {
23 4
        return $this->responses[$name] ?? null;
24
    }
25
26 4
    public function record(string $name, ResponseInterface $response): void
27
    {
28 4
        $this->responses[$name] = $response;
29 4
    }
30
31 1
    public function clear(): void
32
    {
33 1
        $this->responses = [];
34 1
    }
35
}
36