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.

AbstractPrefetchDriver::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 5
cp 0.8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2.032
1
<?php
2
3
namespace Bernard\Driver;
4
5
/**
6
 * For some drivers it gives a performance boost not to query the backend
7
 * all the time. This is mostly for SQS and IronMQ.
8
 */
9
abstract class AbstractPrefetchDriver implements \Bernard\Driver
10
{
11
    protected $prefetch;
12
    protected $cache;
13
14
    /**
15
     * @param int|null $prefetch
16
     */
17 23
    public function __construct($prefetch = null)
18
    {
19 23
        $this->prefetch = $prefetch ? (int) $prefetch : 2;
20 23
        $this->cache = new PrefetchMessageCache();
21 23
    }
22
}
23