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...
14
{
15
/**
16
* Resource identifier
17
*
18
* @var ResourceIdentifierObject
19
*/
20
protected $identifier;
21
22
/**
23
* SingleResourceDocument constructor.
24
*
25
* @param ResourceIdentifierObject $resource
26
* @param array $metadata
27
*/
28
19
public function __construct(ResourceIdentifierObject $resource, array $metadata = [])
29
{
30
19
$this->identifier = $resource;
31
19
$this->metadata = $metadata;
32
19
}
33
34
/**
35
* Get resource identifier
36
*
37
* @return ResourceIdentifierObject
38
*/
39
7
public function getIdentifier(): ResourceIdentifierObject
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.