Completed
Push — master ( 27b3cb...f1c80d )
by Nikola
02:33
created

BackupException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 18
ccs 0
cts 6
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A typeOf() 0 9 3
1
<?php
2
/*
3
 * This file is part of the Backup package, an RunOpenCode project.
4
 *
5
 * (c) 2015 RunOpenCode
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * This project is fork of "kbond/php-backup", for full credits info, please
11
 * view CREDITS file that was distributed with this source code.
12
 */
13
namespace RunOpenCode\Backup\Exception;
14
15
class BackupException extends \Exception
16
{
17
    /**
18
     * Get type of argument for exception messages.
19
     *
20
     * @param $arg
21
     * @return string
22
     */
23
    public static function typeOf($arg) {
24
        if (is_null($arg)) {
25
            return 'NULL';
26
        } elseif (is_object($arg)) {
27
            return get_class($arg);
28
        } else {
29
            return gettype($arg);
30
        }
31
    }
32
}
33