for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Innmind\ProvisionerBundle\Voter;
use Symfony\Component\Console\Input\InputInterface;
class StandardVoter implements VoterInterface
{
protected $triggers;
public function __construct(array $triggers)
$this->triggers = $triggers;
}
/**
* @inheritdoc
*/
public function supportsCommand($command)
return in_array($command, $this->triggers, true);
public function vote($command, InputInterface $input)
return in_array($command, $this->triggers, true) ?
self::TRIGGER_GRANTED :
self::TRIGGER_ABSTAIN;