for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Indatus\Dispatcher;
use Indatus\Dispatcher\Scheduling\ScheduledCommandInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* @copyright 2014 Indatus
* @package Indatus\Dispatcher
*/
class Debugger
{
/** @var \Symfony\Component\Console\Output\OutputInterface */
protected $output;
/** @var \Indatus\Dispatcher\OptionReader */
protected $optionReader;
public function __construct(OptionReader $optionReader, OutputInterface $output)
$this->output = $output;
$this->optionReader = $optionReader;
}
* Indicate why a command was not run
*
* @param ScheduledCommandInterface $command
* @param $reason
public function commandNotRun(ScheduledCommandInterface $command, $reason)
if ($this->optionReader->isDebugMode()) {
$this->output->writeln(' <comment>'.$command->getName().'</comment>: '.$reason);
* Indicate why a command has run
* @param $runCommand
public function commandRun(ScheduledCommandInterface $command, $runCommand)
$this->output->writeln(' <info>'.$command->getName().'</info>: '.$runCommand);
* Log plain text
* @param $message
public function log($message)
$this->output->writeln($message);