| Total Complexity | 8 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 76.47% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 5 | class RegularComment extends Comment implements CommentTypeInterface |
||
| 6 | { |
||
| 7 | 6 | public function getPattern(): string |
|
| 8 | { |
||
| 9 | 6 | return '/(#(?!.*\b(?:todo|fixme)\b:?).*?$)|(\/\/(?!.*\b(?:todo|fixme)\b:?).*?$)|\/\*(?!\*)(?!.*\b(?:todo|fixme)\b:?).*?\*\//ms'; |
|
| 10 | } |
||
| 11 | |||
| 12 | 1 | public function getColor(): string |
|
| 13 | { |
||
| 14 | 1 | return 'red'; |
|
| 15 | } |
||
| 16 | |||
| 17 | 1 | public function getStatColor(int $count, array $thresholds): string |
|
| 18 | { |
||
| 19 | 1 | if (! isset($thresholds[$this->getName()])) { |
|
| 20 | 1 | return 'white'; |
|
| 21 | } |
||
| 22 | if ($count <= $thresholds[$this->getName()]) { |
||
| 23 | return 'green'; |
||
| 24 | } |
||
| 25 | $this->exceedThreshold = true; |
||
| 26 | return 'red'; |
||
| 27 | } |
||
| 28 | |||
| 29 | 2 | public function getWeight(): float |
|
| 32 | } |
||
| 33 | |||
| 34 | 2 | public function getAttitude(): string |
|
| 37 | } |
||
| 38 | |||
| 39 | 2 | public function getName(): string |
|
| 42 | } |
||
| 43 | } |
||
| 44 |