for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Cocotte\Command;
use Cocotte\Console\Documentation\MarkdownDocumentation;
use Cocotte\Environment\EnvironmentState;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
final class BuildDocCommand extends Command
{
/**
* @var EnvironmentState
*/
private $environmentState;
public function __construct(EnvironmentState $environmentState)
$this->environmentState = $environmentState;
parent::__construct();
}
public function isHidden()
return true;
protected function configure(): void
$this->setName('build-doc');
protected function execute(InputInterface $input, OutputInterface $output)
if (!$this->environmentState->isBare()) {
throw new \Exception("Environment is populated. This command needs to run on a bare environment.");
$markdownDocumentation = new MarkdownDocumentation($output);
$markdownDocumentation->document($this->getApplication());