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