| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 69 | public function addAspect($aspect) |
|
| 33 | { |
||
| 34 | 69 | $this->aspects[(string)$aspect] = true; |
|
| 35 | 69 | assert($this instanceof AnnotatedInterface); |
|
| 36 | 69 | $it = new CompositionIterator($this); |
|
| 37 | 69 | $it->ofType(AspectsInterface::class); |
|
| 38 | 69 | foreach($it as $subDocument) |
|
| 39 | { |
||
| 40 | 11 | AspectManager::addAspect($subDocument, $aspect); |
|
| 41 | } |
||
| 42 | 69 | } |
|
| 43 | |||
| 70 | } |