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::getBaseDirectory()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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