| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | class PHPUnit implements CoverageResolver |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * Path to phpunit |
||
| 30 | * |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | private $phpUnit; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * PHPUnit constructor. |
||
| 37 | * |
||
| 38 | 3 | * @param string $pathToPHPUnit |
|
| 39 | */ |
||
| 40 | 3 | public function __construct(string $pathToPHPUnit) |
|
| 41 | 3 | { |
|
| 42 | $this->phpUnit = $pathToPHPUnit; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Run PHPUnit to calculate code coverage. |
||
| 47 | * Shamelessly ripped from bruli/php-git-hooks. |
||
| 48 | * |
||
| 49 | * @author Pablo Braulio |
||
| 50 | 3 | * @return float |
|
| 51 | */ |
||
| 52 | 3 | public function getCoverage(): float |
|
| 61 | } |
||
| 62 | } |
||
| 63 |