ChargeType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 22
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 4 1
1
<?php
2
namespace PHPSC\PagSeguro\Requests\PreApprovals;
3
4
/**
5
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
6
 */
7
class ChargeType
8
{
9
    /**
10
     * @var string
11
     */
12
    const AUTOMATIC = 'auto';
13
14
    /**
15
     * @var string
16
     */
17
    const MANUAL = 'manual';
18
19
    /**
20
     * @param string $type
21
     *
22
     * @return boolean
23
     */
24 6
    public static function isValid($type)
25
    {
26 6
        return in_array($type, [static::AUTOMATIC, static::MANUAL]);
27
    }
28
}
29