| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function getCodeRating() |
||
| 29 | { |
||
| 30 | $totalRating = 0; |
||
| 31 | foreach ($this->analyzedFiles as $file) { |
||
| 32 | $totalRating += $file->getQuality(); |
||
| 33 | } |
||
| 34 | |||
| 35 | $totalFiles = $this->countFiles(); |
||
| 36 | |||
| 37 | $rating = number_format(($totalFiles === 0) ? 0 : (($totalRating / $totalFiles) / self::MAX_CODE_RATING_FILE) * self::MAX_CODE_RATING, |
||
| 38 | 2); |
||
| 39 | |||
| 40 | return $rating; |
||
| 41 | } |
||
| 42 | |||
| 98 |