DriverException::configurationFileIsInvalid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * This file is part of the Drest package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author Lee Davis
9
 * @copyright Copyright (c) Lee Davis <@leedavis81>
10
 * @link https://github.com/leedavis81/drest/blob/master/LICENSE
11
 * @license http://opensource.org/licenses/MIT The MIT X License (MIT)
12
 */
13
namespace Drest\Mapping\Driver;
14
15
16
17
/**
18
 * Base exception class for all Drest exceptions.
19
 */
20
class DriverException extends \Exception
21
{
22 6
    public static function configurationFileDoesntExist($path)
23
    {
24 6
        return new self('The configuration file doesn\'t exist at path: ' . $path);
25
    }
26
27 3
    public static function configurationFileIsInvalid($format)
28
    {
29 3
        return new self('The configuration file returns an invalid format. It should be a "' . $format . '"" file.');
30
    }
31
}