Skip to content

Commit 7bf6fb4

Browse files
committed
fix for ContainerInterface is null
1 parent 8f06680 commit 7bf6fb4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

library/Odesk/Phystrix/AbstractCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ abstract class AbstractCommand
6464
private $commandMetricsFactory;
6565

6666
/**
67-
* @var ContainerInterface
67+
* @var ContainerInterface|null
6868
*/
6969
protected $container;
7070

@@ -292,9 +292,9 @@ protected function processExecutionEvent($eventName)
292292
/**
293293
* Sets service container instance, for injecting custom dependencies into the command
294294
*
295-
* @param ContainerInterface $container
295+
* @param ContainerInterface|null $container
296296
*/
297-
public function setContainer(ContainerInterface $container)
297+
public function setContainer(ContainerInterface $container = null)
298298
{
299299
$this->container = $container;
300300
}

library/Odesk/Phystrix/CommandFactory.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ class CommandFactory
6363
* Constructor
6464
*
6565
* @param Config $config
66-
* @param LocatorInterface $serviceLocator
6766
* @param CircuitBreakerFactory $circuitBreakerFactory
6867
* @param CommandMetricsFactory $commandMetricsFactory
69-
* @param RequestCache $requestCache
70-
* @param RequestLog $requestLog
71-
* @param ContainerInterface $container
68+
* @param RequestCache|null $requestCache
69+
* @param RequestLog|null $requestLog
70+
* @param ContainerInterface|null $container
7271
*/
7372
public function __construct(
7473
Config $config,

0 commit comments

Comments
 (0)