Data   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCode() 0 9 2
1
<?php
2
3
/*
4
 * This file is part of the GestPayWS library.
5
 *
6
 * (c) Manuel Dalla Lana <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace EndelWar\GestPayWS\Data;
13
14
/**
15
 * Class Data
16
 * @package EndelWar\GestPayWS\Data
17
 */
18
abstract class Data
19
{
20
    /**
21
     * @param $costantName
22
     * @return bool|mixed
23
     */
24 4
    public static function getCode($costantName)
25
    {
26 4
        $costantName = strtoupper($costantName);
27 4
        if (defined("static::$costantName")) {
28 2
            return constant("static::$costantName");
29
        }
30
31 2
        return false;
32
    }
33
}
34