Environment::toOptionArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 7
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Stockbase\Integration\Model\Config\Source;
4
5
use Magento\Framework\Option\ArrayInterface;
6
7
/**
8
 * Selector source for the Environment configuration option.
9
 */
10
class Environment implements ArrayInterface
11
{
12
    const PRODUCTION = 'production';
13
    const STAGING = 'staging';
14
15
    /**
16
     * @return array
17
     */
18
    public function toOptionArray()
19
    {
20
        return [
21
            ['value' => self::STAGING, 'label' => __('Staging')],
22
            ['value' => self::PRODUCTION, 'label' => __('Production')],
23
        ];
24
    }
25
}
26