RowPicker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A pick() 0 4 1
1
<?php
2
3
namespace Mouf\Utils\DataSource\Pickers;
4
5
6
use Mouf\Utils\DataSource\Interfaces\PickerInterface;
7
use Mouf\Utils\DataSource\Interfaces\RowInterface;
8
9
class RowPicker implements PickerInterface
10
{
11
    /**
12
     * @var string
13
     */
14
    private $rowBddName;
15
16
    /**
17
     * Matcher constructor.
18
     * @param string $rowBddName
19
     */
20
    public function __construct($rowBddName)
21
    {
22
        $this->rowBddName = $rowBddName;
23
    }
24
25
    /**
26
     * @param RowInterface $row
27
     * @return array
28
     */
29
    public function pick(RowInterface $row)
30
    {
31
        return $row->getRow() [$this->rowBddName];
32
    }
33
}