Data   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 14
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCode() 0 8 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
 */
17
abstract class Data
18
{
19
    /**
20
     * @param $costantName
21
     * @return bool|mixed
22
     */
23
    public static function getCode($costantName)
24
    {
25
        $costantName = strtoupper($costantName);
26
        if (defined("static::$costantName")) {
27
            return constant("static::$costantName");
28
        }
29
30
        return false;
31
    }
32
}
33