@@ -128,6 +128,9 @@ discard block |
||
| 128 | 128 | ]; |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | + /** |
|
| 132 | + * @param string $filename |
|
| 133 | + */ |
|
| 131 | 134 | public function addOutputToFile($filename) |
| 132 | 135 | { |
| 133 | 136 | // can we open the file? |
@@ -169,6 +172,9 @@ discard block |
||
| 169 | 172 | // |
| 170 | 173 | // ------------------------------------------------------------------ |
| 171 | 174 | |
| 175 | + /** |
|
| 176 | + * @param integer $mode |
|
| 177 | + */ |
|
| 172 | 178 | public function setColourMode($mode) |
| 173 | 179 | { |
| 174 | 180 | switch ($mode) |
@@ -179,8 +179,7 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | public function resetSilentMode() |
| 181 | 181 | { |
| 182 | - foreach ($this->plugins as $plugin) |
|
| 183 | - { |
|
| 182 | + foreach ($this->plugins as $plugin) { |
|
| 184 | 183 | $plugin->resetSilentMode(); |
| 185 | 184 | } |
| 186 | 185 | } |
@@ -196,8 +195,7 @@ discard block |
||
| 196 | 195 | */ |
| 197 | 196 | public function setSilentMode() |
| 198 | 197 | { |
| 199 | - foreach ($this->plugins as $plugin) |
|
| 200 | - { |
|
| 198 | + foreach ($this->plugins as $plugin) { |
|
| 201 | 199 | $plugin->setSilentMode(); |
| 202 | 200 | } |
| 203 | 201 | } |
@@ -213,8 +211,7 @@ discard block |
||
| 213 | 211 | */ |
| 214 | 212 | public function setIsVerbose($isVerbose) |
| 215 | 213 | { |
| 216 | - foreach ($this->plugins as $plugin) |
|
| 217 | - { |
|
| 214 | + foreach ($this->plugins as $plugin) { |
|
| 218 | 215 | $plugin->setIsVerbose($isVerbose); |
| 219 | 216 | } |
| 220 | 217 | } |
@@ -226,8 +223,7 @@ discard block |
||
| 226 | 223 | */ |
| 227 | 224 | public function disableColourSupport() |
| 228 | 225 | { |
| 229 | - foreach ($this->plugins as $plugin) |
|
| 230 | - { |
|
| 226 | + foreach ($this->plugins as $plugin) { |
|
| 231 | 227 | $plugin->disableColourSupport(); |
| 232 | 228 | } |
| 233 | 229 | } |
@@ -239,8 +235,7 @@ discard block |
||
| 239 | 235 | */ |
| 240 | 236 | public function enforceColourSupport() |
| 241 | 237 | { |
| 242 | - foreach ($this->plugins as $plugin) |
|
| 243 | - { |
|
| 238 | + foreach ($this->plugins as $plugin) { |
|
| 244 | 239 | $plugin->enforceColourSupport(); |
| 245 | 240 | } |
| 246 | 241 | } |
@@ -257,8 +252,7 @@ discard block |
||
| 257 | 252 | */ |
| 258 | 253 | public function enableColourSupport() |
| 259 | 254 | { |
| 260 | - foreach ($this->plugins as $plugin) |
|
| 261 | - { |
|
| 255 | + foreach ($this->plugins as $plugin) { |
|
| 262 | 256 | $plugin->enableColourSupport(); |
| 263 | 257 | } |
| 264 | 258 | } |
@@ -281,8 +275,7 @@ discard block |
||
| 281 | 275 | Contract::RequiresValue($license, is_string($license)); |
| 282 | 276 | |
| 283 | 277 | // call all of our plugins |
| 284 | - foreach ($this->plugins as $plugin) |
|
| 285 | - { |
|
| 278 | + foreach ($this->plugins as $plugin) { |
|
| 286 | 279 | $plugin->startStoryplayer($version, $url, $copyright, $license); |
| 287 | 280 | } |
| 288 | 281 | } |
@@ -296,8 +289,7 @@ discard block |
||
| 296 | 289 | */ |
| 297 | 290 | public function endStoryplayer($duration) |
| 298 | 291 | { |
| 299 | - foreach ($this->plugins as $plugin) |
|
| 300 | - { |
|
| 292 | + foreach ($this->plugins as $plugin) { |
|
| 301 | 293 | $plugin->endStoryplayer($duration); |
| 302 | 294 | } |
| 303 | 295 | } |
@@ -321,8 +313,7 @@ discard block |
||
| 321 | 313 | Contract::RequiresValue($name, is_string($name)); |
| 322 | 314 | |
| 323 | 315 | // call our plugins |
| 324 | - foreach ($this->plugins as $plugin) |
|
| 325 | - { |
|
| 316 | + foreach ($this->plugins as $plugin) { |
|
| 326 | 317 | $plugin->startPhaseGroup($activity, $name, $details); |
| 327 | 318 | } |
| 328 | 319 | } |
@@ -343,8 +334,7 @@ discard block |
||
| 343 | 334 | Contract::Requires($result instanceof PhaseGroup_Result); |
| 344 | 335 | |
| 345 | 336 | // call our plugins |
| 346 | - foreach ($this->plugins as $plugin) |
|
| 347 | - { |
|
| 337 | + foreach ($this->plugins as $plugin) { |
|
| 348 | 338 | $plugin->endPhaseGroup($result); |
| 349 | 339 | } |
| 350 | 340 | } |
@@ -361,8 +351,7 @@ discard block |
||
| 361 | 351 | // enforce our input type |
| 362 | 352 | Contract::Requires($phase instanceof Phase); |
| 363 | 353 | |
| 364 | - foreach ($this->plugins as $plugin) |
|
| 365 | - { |
|
| 354 | + foreach ($this->plugins as $plugin) { |
|
| 366 | 355 | $plugin->startPhase($phase); |
| 367 | 356 | } |
| 368 | 357 | } |
@@ -387,8 +376,7 @@ discard block |
||
| 387 | 376 | $this->activityLog=[]; |
| 388 | 377 | |
| 389 | 378 | // pass the phase on |
| 390 | - foreach ($this->plugins as $plugin) |
|
| 391 | - { |
|
| 379 | + foreach ($this->plugins as $plugin) { |
|
| 392 | 380 | $plugin->endPhase($phase, $phaseResult); |
| 393 | 381 | } |
| 394 | 382 | } |
@@ -420,8 +408,7 @@ discard block |
||
| 420 | 408 | ]; |
| 421 | 409 | |
| 422 | 410 | // call all of our plugins |
| 423 | - foreach ($this->plugins as $plugin) |
|
| 424 | - { |
|
| 411 | + foreach ($this->plugins as $plugin) { |
|
| 425 | 412 | $plugin->logPhaseActivity($msg, $codeLine); |
| 426 | 413 | } |
| 427 | 414 | } |
@@ -448,8 +435,7 @@ discard block |
||
| 448 | 435 | ]; |
| 449 | 436 | |
| 450 | 437 | // call all of our plugins |
| 451 | - foreach ($this->plugins as $plugin) |
|
| 452 | - { |
|
| 438 | + foreach ($this->plugins as $plugin) { |
|
| 453 | 439 | $plugin->logPhaseSubprocessOutput($msg); |
| 454 | 440 | } |
| 455 | 441 | } |
@@ -478,8 +464,7 @@ discard block |
||
| 478 | 464 | ]; |
| 479 | 465 | |
| 480 | 466 | // call all of our plugins |
| 481 | - foreach ($this->plugins as $plugin) |
|
| 482 | - { |
|
| 467 | + foreach ($this->plugins as $plugin) { |
|
| 483 | 468 | $plugin->logPhaseError($phaseName, $msg); |
| 484 | 469 | } |
| 485 | 470 | } |
@@ -508,8 +493,7 @@ discard block |
||
| 508 | 493 | ]; |
| 509 | 494 | |
| 510 | 495 | // call all of our plugins |
| 511 | - foreach ($this->plugins as $plugin) |
|
| 512 | - { |
|
| 496 | + foreach ($this->plugins as $plugin) { |
|
| 513 | 497 | $plugin->logPhaseSkipped($phaseName, $msg); |
| 514 | 498 | } |
| 515 | 499 | } |
@@ -528,8 +512,7 @@ discard block |
||
| 528 | 512 | Contract::RequiresValue($codeLine, is_array($codeLine)); |
| 529 | 513 | |
| 530 | 514 | // pass it on to all of our plugins |
| 531 | - foreach ($this->plugins as $plugin) |
|
| 532 | - { |
|
| 515 | + foreach ($this->plugins as $plugin) { |
|
| 533 | 516 | $plugin->logPhaseCodeLine($codeLine); |
| 534 | 517 | } |
| 535 | 518 | } |
@@ -548,8 +531,7 @@ discard block |
||
| 548 | 531 | Contract::RequiresValue($msg, is_string($msg)); |
| 549 | 532 | |
| 550 | 533 | // pass it on to our plugins |
| 551 | - foreach ($this->plugins as $plugin) |
|
| 552 | - { |
|
| 534 | + foreach ($this->plugins as $plugin) { |
|
| 553 | 535 | $plugin->logCliError($msg); |
| 554 | 536 | } |
| 555 | 537 | } |
@@ -570,8 +552,7 @@ discard block |
||
| 570 | 552 | Contract::RequiresValue($e, $e instanceof Exception); |
| 571 | 553 | |
| 572 | 554 | // pass this on to our plugins |
| 573 | - foreach ($this->plugins as $plugin) |
|
| 574 | - { |
|
| 555 | + foreach ($this->plugins as $plugin) { |
|
| 575 | 556 | $plugin->logCliErrorWithException($msg, $e); |
| 576 | 557 | } |
| 577 | 558 | } |
@@ -590,8 +571,7 @@ discard block |
||
| 590 | 571 | Contract::RequiresValue($msg, is_string($msg)); |
| 591 | 572 | |
| 592 | 573 | // pass this on to our plugins |
| 593 | - foreach ($this->plugins as $plugin) |
|
| 594 | - { |
|
| 574 | + foreach ($this->plugins as $plugin) { |
|
| 595 | 575 | $plugin->logCliWarning($msg); |
| 596 | 576 | } |
| 597 | 577 | } |
@@ -610,8 +590,7 @@ discard block |
||
| 610 | 590 | Contract::RequiresValue($msg, is_string($msg)); |
| 611 | 591 | |
| 612 | 592 | // pass this on to our plugins |
| 613 | - foreach ($this->plugins as $plugin) |
|
| 614 | - { |
|
| 593 | + foreach ($this->plugins as $plugin) { |
|
| 615 | 594 | $plugin->logCliInfo($msg); |
| 616 | 595 | } |
| 617 | 596 | } |
@@ -634,8 +613,7 @@ discard block |
||
| 634 | 613 | // $var can be anything, so there is no contract to enforce |
| 635 | 614 | |
| 636 | 615 | // pass this on to our plugins |
| 637 | - foreach ($this->plugins as $plugin) |
|
| 638 | - { |
|
| 616 | + foreach ($this->plugins as $plugin) { |
|
| 639 | 617 | $plugin->logVardump($name, $var); |
| 640 | 618 | } |
| 641 | 619 | } |