for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dazzle\Channel\Router\RuleMatch;
use Dazzle\Channel\Protocol\ProtocolInterface;
class RuleNegate
{
/**
* @var callable
*/
protected $rule;
* @param callable $rule
public function __construct(callable $rule)
$this->rule = $rule;
}
*
public function __destruct()
unset($this->rule);
* @param string $name
* @param ProtocolInterface $protocol
* @return bool
public function __invoke($name, ProtocolInterface $protocol)
$call = $this->rule;
return !$call($name, $protocol);