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
Push — master ( 04545f...260fcb )
by Bram
20:40 queued 15:15
created

FileOptions::setBaseDirectory()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
ccs 7
cts 7
cp 1
rs 9.4285
cc 3
eloc 6
nc 3
nop 1
crap 3
1
<?php
2
/**
3
 * @author Bram Gerritsen [email protected]
4
 * @author Freek Gruntjes [email protected]
5
 * @copyright (c) Bram Gerritsen 2013
6
 * @license http://opensource.org/licenses/mit-license.php
7
 */
8
9
namespace StrokerCache\Storage\Adapter;
10
11
use RuntimeException;
12
use Zend\Cache\Storage\Adapter\AdapterOptions;
13
14
class FileOptions extends AdapterOptions
15
{
16
    /**
17
     * @var string
18
     */
19
    protected $baseDirectory;
20
21
    /**
22
     * @return string
23
     */
24 8
    public function getBaseDirectory()
25
    {
26 8
        return $this->baseDirectory;
27
    }
28
29
    /**
30
     * @param  string           $baseDirectory
31
     * @throws RuntimeException
32
     */
33 10
    public function setBaseDirectory($baseDirectory)
34
    {
35 10
        if (!is_dir($baseDirectory)) {
36 1
            throw new RuntimeException('Cache directory: "' . $baseDirectory . '" is not a directory.');
37
        }
38
39 9
        if (!is_writable($baseDirectory)) {
40 1
            throw new RuntimeException('Cache directory: "' . $baseDirectory . '" is not writable.');
41
        }
42 8
        $this->baseDirectory = $baseDirectory;
43 8
    }
44
}
45