for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace DICIT\Activators;
use DICIT\ActivatorDecorator;
use DICIT\Container;
use DICIT\UnbuildableServiceException;
use DICIT\Activator;
class AbstractActivatorDecorator implements ActivatorDecorator
{
/**
*
* @var Activator
*/
protected $wrappedActivator = null;
public function setNext(Activator $activator)
$this->wrappedActivator = $activator;
return $this;
}
public function createInstance(Container $container, $serviceName, array $serviceConfig)
$this->before($container, $serviceName, $serviceConfig);
$result = $this->aroundNext($container, $serviceName, $serviceConfig);
return $this->after($container, $serviceName, $serviceConfig, $result);
protected function before(Container $container, &$serviceName, array &$serviceConfig)
$container
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$serviceName
$serviceConfig
protected function after(Container $container, &$serviceName, array &$serviceConfig, $returnObject)
return $returnObject;
protected function aroundNext(Container $container, &$serviceName, array &$serviceConfig)
if ($this->wrappedActivator) {
return $this->wrappedActivator->createInstance($container, $serviceName, $serviceConfig);
return null;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.