/** * @param RunnerEvent $e * * @return void * @throws ProcessException */ public function popStash(RunnerEvent $e) { if (!$this->isStashEnabled($e->getContext())) { return; } $this->doPopStash(); }
/** * @param RunnerEvent $event */ public function startProgress(RunnerEvent $event) { $numberOftasks = $event->getTasks()->count(); $this->progressBar->setFormat('<fg=yellow>%message%</fg=yellow>'); $this->progressBar->setMessage('GrumPHP is sniffing your code!'); $this->progressBar->start($numberOftasks); }
function it_starts_progress(ProgressBar $progressBar, RunnerEvent $event, TasksCollection $tasks) { $tasks->count()->willReturn(2); $event->getTasks()->willReturn($tasks); $progressBar->setFormat(Argument::type('string'))->shouldBeCalled(); $progressBar->setOverwrite(false)->shouldBeCalled(); $progressBar->setMessage(Argument::type('string'))->shouldBeCalled(); $progressBar->start(2)->shouldBeCalled(); $this->startProgress($event); }
/** * @param TasksCollection $tasks * @param ContextInterface $context * @param array $messages */ public function __construct(TasksCollection $tasks, ContextInterface $context, array $messages) { parent::__construct($tasks, $context); $this->messages = $messages; }
/** * @param TasksCollection $tasks * @param array $messages */ public function __construct(TasksCollection $tasks, array $messages) { parent::__construct($tasks); $this->messages = $messages; }