Completed
Push — master ( cc2eeb...d54692 )
by Woody
03:30
created

OptionsHydrateTrait::hydrate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
crap 2
1
<?php
2
3
namespace Equip\Command;
4
5
/**
6
 * Provides hydrating functionality for options.
7
 */
8
trait OptionsHydrateTrait
9
{
10
    /**
11
     * Hydrate the current object with the given values.
12
     *
13
     * Values should be filtered beforehand so that only properties that exist
14
     * in the object are passed.
15
     *
16
     * @param array $values
17
     *
18
     * @return void
19
     */
20 1
    private function hydrate(array $values)
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
21
    {
22 1
        foreach ($values as $key => $value) {
23 1
            $this->$key = $value;
24 1
        }
25 1
    }
26
}
27