Passed
Pull Request — development (#682)
by Nick
07:18
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
/**
6
 * Class GeoCacheType
7
 *
8
 * @package Oc\GeoCache\Enum
0 ignored issues
show
introduced by
Unexpected tag type @package in doc block
Loading history...
9
 */
10
class GeoCacheType
11
{
12
    /**
13
     * @var int
14
     */
15
    const UNKNOWN = 1;
16
17
    /**
18
     * @var int
19
     */
20
    const TRADITIONAL = 2;
21
22
    /**
23
     * @var int
24
     */
25
    const MULTI = 3;
26
27
    /**
28
     * @var int
29
     */
30
    const VIRTUAL = 4;
31
32
    /**
33
     * @var int
34
     */
35
    const WEBCAM = 5;
36
37
    /**
38
     * @var int
39
     */
40
    const EVENT = 6;
41
42
    /**
43
     * @var int
44
     */
45
    const QUIZ = 7;
46
47
    /**
48
     * @var int
49
     */
50
    const MATH = 8;
51
52
    /**
53
     * @var int
54
     */
55
    const MOVING = 9;
56
57
    /**
58
     * @var int
59
     */
60
    const DRIVE_IN = 10;
61
62
    /**
63
     * @var int[]
64
     */
65
    const EVENT_TYPES = [
66
        self::EVENT
67
    ];
68
69
    /**
70
     * Checks if the given geocache type is an event type.
71
     *
72
     * @param int $geoCacheType
73
     *
74
     * @return bool Returns true if this type is an event type
75
     */
76
    public static function isEventType($geoCacheType)
77
    {
78
        return in_array($geoCacheType, self::EVENT_TYPES, true);
79
    }
80
}
81