Completed
Push — development ( daed94...13a157 )
by Thomas
18s
created

GeoCacheType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 71
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isEventType() 0 4 1
1
<?php
2
3
namespace Oc\GeoCache\Enum;
4
5
class GeoCacheType
6
{
7
    /**
8
     * @var int
9
     */
10
    const UNKNOWN = 1;
11
12
    /**
13
     * @var int
14
     */
15
    const TRADITIONAL = 2;
16
17
    /**
18
     * @var int
19
     */
20
    const MULTI = 3;
21
22
    /**
23
     * @var int
24
     */
25
    const VIRTUAL = 4;
26
27
    /**
28
     * @var int
29
     */
30
    const WEBCAM = 5;
31
32
    /**
33
     * @var int
34
     */
35
    const EVENT = 6;
36
37
    /**
38
     * @var int
39
     */
40
    const QUIZ = 7;
41
42
    /**
43
     * @var int
44
     */
45
    const MATH = 8;
46
47
    /**
48
     * @var int
49
     */
50
    const MOVING = 9;
51
52
    /**
53
     * @var int
54
     */
55
    const DRIVE_IN = 10;
56
57
    /**
58
     * @var int[]
59
     */
60
    const EVENT_TYPES = [
61
        self::EVENT
62
    ];
63
64
    /**
65
     * Checks if the given geocache type is an event type.
66
     *
67
     * @param int $geoCacheType
68
     *
69
     * @return bool Returns true if this type is an event type
70
     */
71
    public static function isEventType($geoCacheType)
72
    {
73
        return in_array($geoCacheType, self::EVENT_TYPES, true);
74
    }
75
}
76