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