Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
46 | 56 | public function getByCleanName($cleanedName) |
|
47 | { |
||
48 | 56 | $attribute = null; |
|
49 | 56 | foreach ($this->objects as $object) { |
|
50 | 56 | if ($object instanceof Model && $cleanedName === $object->getCleanName()) { |
|
51 | 4 | $attribute = $object; |
|
52 | 4 | break; |
|
53 | } |
||
54 | 56 | } |
|
55 | 56 | return $attribute; |
|
56 | } |
||
57 | } |
||
58 |