RowPicker::pick()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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
}