Passed
Push — develop ( 653998...1c9254 )
by Daniel
05:33
created

TabsItemFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Factory\Entity\Component\Navigation\Tabs;
4
5
use Silverback\ApiComponentBundle\Entity\Component\Navigation\Tabs\TabsItem;
6
use Silverback\ApiComponentBundle\Factory\Entity\Component\AbstractComponentFactory;
7
use Silverback\ApiComponentBundle\Factory\Entity\Component\Navigation\AbstractNavigationItemFactory;
8
9
/**
10
 * @author Daniel West <[email protected]>
11
 */
12
final class TabsItemFactory extends AbstractNavigationItemFactory
13
{
14
    /**
15
     * @inheritdoc
16
     */
17 2
    public function create(?array $ops = null): TabsItem
18
    {
19 2
        $component = new TabsItem();
20 2
        $this->init($component, $ops);
21 2
        $this->validate($component);
22 2
        return $component;
23
    }
24
}
25