ExampleEnvironment::getValidModes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/**
4
 * This is an example Environment, for when you want to use a custom $envVar
5
 * or want to use other than the predefined modes.
6
 *
7
 * If you use the extended class, don't forget to modify your bootstrap file as well
8
 * to call this class.
9
 */
10
class ExampleEnvironment extends \marcovtwout\YiiEnvironment\Environment
11
{
12
13
    /**
14
     * @var string name of env var to check
15
     */
16
    protected $envVar = 'MY_ENVIRONMENT';
17
18
    /**
19
     * Extend Environment class and merge parent array if you want to modify/extend these
20
     * @return string[] list of valid modes
21
     */
22
    protected function getValidModes()
23
    {
24
        return array_merge(parent::getValidModes(), array(
25
            250 => 'QUALITY_ASSURANCE',
26
        ));
27
    }
28
}
29