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...
22
{
23
/**
24
* @var DeferredCollection
25
*/
26
private $storage;
27
28
/**
29
* DeferredInterceptor constructor.
30
* @param DeferredCollection $storage
31
*/
32
public function __construct(DeferredCollection $storage)
33
{
34
$this->storage = $storage;
35
}
36
37
/**
38
* @param RuleInterface $value
39
* @return bool
40
*/
41
public function match($value): bool
42
{
43
return $value instanceof \Closure;
44
}
45
46
/**
47
* @param ContextInterface $context
48
* @param mixed $value
49
* @return array
50
*/
51
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.