| @@ 170-199 (lines=30) @@ | ||
| 167 | ||
| 168 | $phpunitResponse = $preCommitResponse->getPhpUnit(); |
|
| 169 | ||
| 170 | if (true === $phpunitResponse->isPhpunit()) { |
|
| 171 | $this->commandBus->handle( |
|
| 172 | new PhpUnitTool( |
|
| 173 | $phpunitResponse->isPhpunitRandomMode(), |
|
| 174 | $phpunitResponse->getPhpunitOptions(), |
|
| 175 | $preCommitResponse->getErrorMessage() |
|
| 176 | ) |
|
| 177 | ); |
|
| 178 | ||
| 179 | $phpunitStrictCoverageResponse = $preCommitResponse->getPhpUnitStrictCoverage(); |
|
| 180 | ||
| 181 | if (true === $phpunitStrictCoverageResponse->isPhpunitStrictCoverage()) { |
|
| 182 | $this->commandBus->handle( |
|
| 183 | new StrictCoverage( |
|
| 184 | $phpunitStrictCoverageResponse->getMinimum(), |
|
| 185 | $preCommitResponse->getErrorMessage() |
|
| 186 | ) |
|
| 187 | ); |
|
| 188 | } |
|
| 189 | ||
| 190 | $phpunitGuardCoverageResponse = $preCommitResponse->getPhpUnitGuardCoverage(); |
|
| 191 | ||
| 192 | if (true === $phpunitGuardCoverageResponse->isEnabled()) { |
|
| 193 | $this->commandBus->handle( |
|
| 194 | new GuardCoverage( |
|
| 195 | $phpunitGuardCoverageResponse->getWarningMessage() |
|
| 196 | ) |
|
| 197 | ); |
|
| 198 | } |
|
| 199 | } |
|
| 200 | } |
|
| 201 | } |
|
| 202 | ||
| @@ 78-105 (lines=28) @@ | ||
| 75 | ||
| 76 | $phpunitResponse = $prePushResponse->getPhpUnit(); |
|
| 77 | ||
| 78 | if (true === $phpunitResponse->isPhpunit()) { |
|
| 79 | $this->commandBus->handle( |
|
| 80 | new PhpUnitTool( |
|
| 81 | $phpunitResponse->isPhpunitRandomMode(), |
|
| 82 | $phpunitResponse->getPhpunitOptions(), |
|
| 83 | $prePushResponse->getErrorMessage() |
|
| 84 | ) |
|
| 85 | ); |
|
| 86 | ||
| 87 | $phpunitStrictCoverageResponse = $prePushResponse->getPhpUnitStrictCoverage(); |
|
| 88 | ||
| 89 | if (true === $phpunitStrictCoverageResponse->isPhpunitStrictCoverage()) { |
|
| 90 | $this->commandBus->handle( |
|
| 91 | new StrictCoverage( |
|
| 92 | $phpunitStrictCoverageResponse->getMinimum(), |
|
| 93 | $prePushResponse->getErrorMessage() |
|
| 94 | ) |
|
| 95 | ); |
|
| 96 | } |
|
| 97 | ||
| 98 | $phpunitGuardCoverageResponse = $prePushResponse->getPhpUnitGuardCoverage(); |
|
| 99 | ||
| 100 | if (true === $phpunitGuardCoverageResponse->isEnabled()) { |
|
| 101 | $this->commandBus->handle( |
|
| 102 | new GuardCoverage($phpunitGuardCoverageResponse->getWarningMessage()) |
|
| 103 | ); |
|
| 104 | } |
|
| 105 | } |
|
| 106 | ||
| 107 | $this->output->writeln(GoodJobLogoResponse::paint($prePushResponse->getRightMessage())); |
|
| 108 | } |
|