Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
51 | 6 | public function __construct($values) |
|
52 | { |
||
53 | 6 | $this->defaultMethods = array(AbstractCollectionBehavior::ADD, AbstractCollectionBehavior::REMOVE); |
|
54 | |||
55 | $defaults = array( |
||
56 | 6 | 'itemName' => null, |
|
57 | 6 | 'methods' => $this->defaultMethods |
|
58 | 6 | ); |
|
59 | |||
60 | 6 | foreach ($defaults as $property => $defaultValue) { |
|
61 | 6 | $this->$property = (empty($values[$property])) ? $defaultValue : $values[$property]; |
|
62 | 6 | } |
|
63 | 6 | } |
|
64 | |||
85 |