Passed
Pull Request — master (#48)
by Alex
03:02
created

TermKind   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace AlgoWeb\ODataMetadata\Enums;
7
8
/**
9
 * Class EdmTermKind.
10
 *
11
 * Defines EDM term kinds.
12
 *
13
 * @package AlgoWeb\ODataMetadata\MetadataV3\Enums
14
 * @method static self None()  Represents a term implementing
15
 * @method bool isNone()
16
 * @method static self Type() Represents a term implementing @see IStructuredType and @see ISchemaType.
17
 * @method bool isType()
18
 * @method static self Value() Represents a term implementing @see IValueTerm.
19
 * @method bool isValue()
20
 */
21
class TermKind extends Enum
22
{
23
    protected const None  = 1;
24
    protected const Type  = 2;
25
    protected const Value = 3;
26
27
    /**
28
     * Returns the enum key (i.e. the constant name).
29
     *
30
     * @return string
31
     */
32
    public function getKey()
33
    {
34
        return strval(parent::getKey());
35
    }
36
}
37