Skip to content

Commit

Permalink
fix for ContainerInterface is null
Browse files Browse the repository at this point in the history
  • Loading branch information
yupmin committed May 31, 2019
1 parent 8f06680 commit 7bf6fb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions library/Odesk/Phystrix/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ abstract class AbstractCommand
private $commandMetricsFactory;

/**
* @var ContainerInterface
* @var ContainerInterface|null
*/
protected $container;

Expand Down Expand Up @@ -292,9 +292,9 @@ protected function processExecutionEvent($eventName)
/**
* Sets service container instance, for injecting custom dependencies into the command
*
* @param ContainerInterface $container
* @param ContainerInterface|null $container
*/
public function setContainer(ContainerInterface $container)
public function setContainer(ContainerInterface $container = null)
{
$this->container = $container;
}
Expand Down
7 changes: 3 additions & 4 deletions library/Odesk/Phystrix/CommandFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@ class CommandFactory
* Constructor
*
* @param Config $config
* @param LocatorInterface $serviceLocator
* @param CircuitBreakerFactory $circuitBreakerFactory
* @param CommandMetricsFactory $commandMetricsFactory
* @param RequestCache $requestCache
* @param RequestLog $requestLog
* @param ContainerInterface $container
* @param RequestCache|null $requestCache
* @param RequestLog|null $requestLog
* @param ContainerInterface|null $container
*/
public function __construct(
Config $config,
Expand Down

0 comments on commit 7bf6fb4

Please sign in to comment.