for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* @author : Korotkov Danila <[email protected]>
* @license https://mit-license.org/ MIT
*/
namespace Behavioral\ChainOfResponsibility;
* Trait NextTrait
* @package Behavioral\ChainOfResponsibility
trait NextTrait
{
* @param string $event
* @param $chain
protected function next(string $event, $chain)
$handler = array_shift($chain);
if (!isset($handler)) {
return;
}
$handler = new $handler();
$handler->request($event, $chain);