| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function apply(Metrics $metrics) |
||
| 16 | { |
||
| 17 | |||
| 18 | $violations = [ |
||
| 19 | new Class_\Blob(), |
||
| 20 | new Class_\TooComplexClassCode(), |
||
| 21 | new Class_\TooComplexMethodCode(), |
||
| 22 | new Class_\ProbablyBugged(), |
||
| 23 | new Class_\TooLong(), |
||
| 24 | new Class_\TooDependent(), |
||
| 25 | new Package\StableAbstractionsPrinciple(), |
||
| 26 | new Package\StableDependenciesPrinciple(), |
||
| 27 | ]; |
||
| 28 | |||
| 29 | foreach ($metrics->all() as $metric) { |
||
| 30 | $metric->set('violations', new Violations); |
||
| 31 | |||
| 32 | foreach ($violations as $violation) { |
||
| 33 | $violation->apply($metric); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |