WithIntegerValues::castValueIn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Acelaya\Test\Doctrine\Enum;
6
7
use MyCLabs\Enum\Enum;
8
9
/**
10
 * Class WithCastingMethods
11
 * @author
12
 * @link
13
 *
14
 * @method static WithIntegerValues FOO()
15
 * @method static WithIntegerValues BAR()
16
 */
17
class WithIntegerValues extends Enum
18
{
19
    public const ONE = 1;
20
    public const TWO = 2;
21
22
    public static function castValueIn($value)
23
    {
24
        return (int) $value;
25
    }
26
}
27