Completed
Branch 4.0 (c710b5)
by Serhii
02:04
created

StorageException   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 53
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDirectory() 0 4 1
A setDirectory() 0 4 1
A getProvider() 0 4 1
A setProvider() 0 4 1
1
<?php
2
/**
3
 * @author Serhii Nekhaienko <[email protected]>
4
 * @license GPL
5
 * @copyright Serhii Nekhaienko &copy 2018
6
 * @version 4.0.0
7
 * @project browser-detector
8
 */
9
10
namespace EndorphinStudio\Detector\Exception;
11
12
class StorageException extends \Exception
13
{
14
    /**
15
     * Message for exception
16
     */
17
    const DIRECTORY_NOT_FOUND = '%s is not directory or not exists';
18
19
    /**
20
     * @var string Path to directory
21
     */
22
    private $directory;
23
24
    /**
25
     * @var string Classname of Storage Provider
26
     */
27
    private $provider;
28
29
    /**
30
     * Get path to directory which Storage Provider try to load
31
     * @return string Path to directory
32
     */
33
    public function getDirectory(): string
34
    {
35
        return $this->directory;
36
    }
37
38
    /**
39
     * Set path to directory which Storage Provider try to load
40
     * @param string $directory Path to directory
41
     */
42
    public function setDirectory(string $directory)
43
    {
44
        $this->directory = $directory;
45
    }
46
47
    /**
48
     * Get classname of Storage provider
49
     * @return string Classname of Storage Provider
50
     */
51
    public function getProvider(): string
52
    {
53
        return $this->provider;
54
    }
55
56
    /**
57
     * Set classname of Storage Provider
58
     * @param string $provider Classname of Storage Provider
59
     */
60
    public function setProvider(string $provider)
61
    {
62
        $this->provider = $provider;
63
    }
64
}