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

OptionsHydrateTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A hydrate() 0 6 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