Simple::init()   B
last analyzed

Complexity

Conditions 5
Paths 4

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 8.8571
c 0
b 0
f 0
cc 5
eloc 7
nc 4
nop 0
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