Single   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 2
c 2
b 1
f 1
lcom 0
cbo 1
dl 0
loc 10
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 4 2
1
<?php
2
3
namespace GFG\Mapper\Data\Type;
4
5
/**
6
 * For single structures like:
7
 *
8
 * $data = [
9
 *     'brand' => 1
10
 * ];
11
 * $structure = [
12
 *     'brand' => [
13
 *         'type'   => 'single',
14
 *         'prefix' => 'brand'
15
 *     ]
16
 * ];
17
 */
18
class Single extends Base
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23 3
    public function run(&$data, $key = null)
24
    {
25 3
        $data = $this->get($key ?: $data);
26 3
    }
27
}
28