This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
21
{
22
/**
23
* @var DeferredCollection
24
*/
25
private $storage;
26
27
/**
28
* DeferredInterceptor constructor.
29
* @param DeferredCollection $storage
30
*/
31
public function __construct(DeferredCollection $storage)
32
{
33
$this->storage = $storage;
34
}
35
36
/**
37
* @param RuleInterface $value
38
* @return bool
39
*/
40
public function match($value): bool
41
{
42
return $value instanceof DeferredInterface;
43
}
44
45
/**
46
* @param ContextInterface $context
47
* @param mixed $value
48
* @return array
49
*/
50
public function resolve(ContextInterface $context, $value): array
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.