Simple   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B init() 0 12 5
1
<?php
2
/**
3
 * @company MTE Telecom, Ltd.
4
 * @author Ushkov Nikolai <[email protected]>
5
 * Date: 19.04.16
6
 * Time: 11:16
7
 */
8
9
namespace Nnx\DataGrid\NavigationBar;
10
11
use Zend\Stdlib\InitializableInterface;
12
/**
13
 * Class Simple
14
 * @package Nnx\DataGrid\NavigationBar
15
 */
16
class Simple extends AbstractNavigationBar implements InitializableInterface
17
{
18
    /**
19
     * Инициализация
20
     * @throws Exception\InvalidArgumentException
21
     * @throws Exception\RuntimeException
22
     * @throws \Nnx\DataGrid\Button\Exception\InvalidButtonException
23
     */
24
    public function init()
25
    {
26
        $options = $this->getOptions();
27
        if (!empty($options['standartButtons']) && is_array($options['standartButtons'])) {
28
            foreach ($options['standartButtons'] as $button) {
29
                if (!is_array($button)) {
30
                    $button = ['type' => $button];
31
                }
32
                $this->add($button);
33
            }
34
        }
35
    }
36
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
37