for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Highlighter
*
* Copyright (C) 2016, Some right reserved.
* @author Kacper "Kadet" Donat <[email protected]>
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* From Kadet with love.
*/
namespace Kadet\Highlighter\Parser\Validator;
class DelegateValidator extends Validator
{
* @var callable
private $_callable;
* DelegateValidator constructor.
* @param callable $callable
public function __construct(callable $callable)
$this->_callable = $callable;
}
public function validate(array $context, $additional = [])
$callable = $this->_callable;
return $callable($context) && parent::validate($context, $additional);