|
12 | 12 | use function sprintf;
|
13 | 13 | use SebastianBergmann\CodeCoverage\BranchAndPathCoverageNotSupportedException;
|
14 | 14 | use SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData;
|
15 |
| -use SebastianBergmann\CodeCoverage\DeadCodeDetectionNotSupportedException; |
16 | 15 |
|
17 | 16 | /**
|
18 | 17 | * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
|
@@ -54,7 +53,6 @@ abstract class Driver
|
54 | 53 | */
|
55 | 54 | public const int BRANCH_HIT = 1;
|
56 | 55 | private bool $collectBranchAndPathCoverage = false;
|
57 |
| - private bool $detectDeadCode = false; |
58 | 56 |
|
59 | 57 | public function canCollectBranchAndPathCoverage(): bool
|
60 | 58 | {
|
@@ -88,38 +86,6 @@ public function disableBranchAndPathCoverage(): void
|
88 | 86 | $this->collectBranchAndPathCoverage = false;
|
89 | 87 | }
|
90 | 88 |
|
91 |
| - public function canDetectDeadCode(): bool |
92 |
| - { |
93 |
| - return false; |
94 |
| - } |
95 |
| - |
96 |
| - public function detectsDeadCode(): bool |
97 |
| - { |
98 |
| - return $this->detectDeadCode; |
99 |
| - } |
100 |
| - |
101 |
| - /** |
102 |
| - * @throws DeadCodeDetectionNotSupportedException |
103 |
| - */ |
104 |
| - public function enableDeadCodeDetection(): void |
105 |
| - { |
106 |
| - if (!$this->canDetectDeadCode()) { |
107 |
| - throw new DeadCodeDetectionNotSupportedException( |
108 |
| - sprintf( |
109 |
| - '%s does not support dead code detection', |
110 |
| - $this->nameAndVersion(), |
111 |
| - ), |
112 |
| - ); |
113 |
| - } |
114 |
| - |
115 |
| - $this->detectDeadCode = true; |
116 |
| - } |
117 |
| - |
118 |
| - public function disableDeadCodeDetection(): void |
119 |
| - { |
120 |
| - $this->detectDeadCode = false; |
121 |
| - } |
122 |
| - |
123 | 89 | abstract public function nameAndVersion(): string;
|
124 | 90 |
|
125 | 91 | abstract public function start(): void;
|
|
0 commit comments