OfferType::fromCaseInsensitiveValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace CultuurNet\UDB3\Offer;
4
5
use ValueObjects\Enum\Enum;
6
7
/**
8
 * @method static OfferType EVENT()
9
 * @method static OfferType PLACE()
10
 */
11
class OfferType extends Enum
12
{
13
    const EVENT = 'Event';
14
    const PLACE = 'Place';
15
16
    public static function fromCaseInsensitiveValue($value)
17
    {
18
        return self::fromNative(ucfirst(strtolower($value)));
19
    }
20
}
21