ExampleEnvironment   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 6
Bugs 0 Features 1
Metric Value
wmc 1
c 6
b 0
f 1
lcom 0
cbo 1
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValidModes() 0 6 1
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