Completed
Push — develop ( c115d0...f0eafc )
by Carlo
03:05
created

Admin   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 10 2
1
<?php
2
3
namespace Magefix\Fixture\Builder;
4
5
/**
6
 * Class Admin
7
 *
8
 * @package Magefix\Fixture\Builder
9
 * @author  Daniel Kidanemariam <[email protected]>
10
 */
11
class Admin extends AbstractBuilder
12
{
13
    /**
14
     * @return int
15
     * @throws \Exception
16
     *
17
     */
18
    public function build()
19
    {
20
        $this->iterateFixture();
21
        $defaultData = $this->_getMageModelData() ? $this->_getMageModelData() : [];
22
        $mergedData = array_merge($defaultData, $this->_getFixtureAttributes());
23
24
        $this->_getMageModel()->setData($mergedData);
25
26
        return $this->_saveFixture();
27
    }
28
}
29