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 ( 32bc84...629f3d )
by Bram
33:40 queued 26:23
created

FileOptions   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 88.89%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 4
c 2
b 1
f 0
lcom 1
cbo 1
dl 0
loc 31
ccs 8
cts 9
cp 0.8889
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseDirectory() 0 4 1
A setBaseDirectory() 0 11 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 9
    public function setBaseDirectory($baseDirectory)
34
    {
35 9
        if (!is_dir($baseDirectory)) {
36
            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