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...
20
{
21
/**
22
* @var ResponseContext
23
*/
24
private $responseContext;
25
26
/**
27
* @var mixed
28
*/
29
private $resources;
30
31
/**
32
* ResourcesListResponse constructor.
33
*
34
* @param mixed $resources
35
* @param ResponseContext $responseContext
36
*/
37
11
public function __construct($resources, ResponseContext $responseContext = null)
38
{
39
11
if (null === $responseContext) {
40
10
$responseContext = new ResponseContext();
41
}
42
43
11
$this->responseContext = $responseContext;
44
11
$this->resources = $resources;
45
11
}
46
47
/**
48
* {@inheritdoc}
49
*/
50
9
public function getResponseContext(): ResponseContext
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.