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.

FileOptions   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

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
    public function getBaseDirectory()
25
    {
26
        return $this->baseDirectory;
27
    }
28
29
    /**
30
     * @param  string           $baseDirectory
31
     * @throws RuntimeException
32
     */
33
    public function setBaseDirectory($baseDirectory)
34
    {
35
        if (!is_dir($baseDirectory)) {
36
            throw new RuntimeException('Cache directory: "' . $baseDirectory . '" is not a directory.');
37
        }
38
39
        if (!is_writable($baseDirectory)) {
40
            throw new RuntimeException('Cache directory: "' . $baseDirectory . '" is not writable.');
41
        }
42
        $this->baseDirectory = $baseDirectory;
43
    }
44
}
45