| Total Complexity | 8 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 76.47% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class DocBlockComment extends Comment implements CommentTypeInterface |
||
| 8 | { |
||
| 9 | 2 | public function getPattern(): string |
|
| 10 | { |
||
| 11 | 2 | return '/\/\*\*(?!.*\b(?:license|copyright|permission)\b).+?\*\//is'; |
|
| 12 | } |
||
| 13 | |||
| 14 | 1 | public function getColor(): string |
|
| 15 | { |
||
| 16 | 1 | return 'green'; |
|
| 17 | } |
||
| 18 | |||
| 19 | 1 | public function getStatColor(int $count, array $thresholds): string |
|
| 20 | { |
||
| 21 | 1 | if (! isset($thresholds[$this->getName()])) { |
|
| 22 | 1 | return 'white'; |
|
| 23 | } |
||
| 24 | if ($count >= $thresholds[$this->getName()]) { |
||
| 25 | return 'green'; |
||
| 26 | } |
||
| 27 | $this->exceedThreshold = true; |
||
| 28 | return 'red'; |
||
| 29 | } |
||
| 30 | |||
| 31 | 2 | public function getWeight(): float |
|
| 32 | { |
||
| 33 | 2 | return 1; |
|
| 34 | } |
||
| 35 | |||
| 36 | 2 | public function getAttitude(): string |
|
| 39 | } |
||
| 40 | |||
| 41 | 2 | public function getName(): string |
|
| 44 | } |
||
| 45 | } |
||
| 46 |