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
const NAME = 'serializer_context';
23
24
/**
25
* @var array
26
*/
27
private $values;
28
29
/**
30
* Constructor
31
*
32
* @param array $params
33
*/
34
public function __construct(array $params)
35
{
36
Tebru\assertArrayKeyExists('value', $params, 'SerializerContext must be passed a value');
37
Tebru\assertTrue(is_array($params['value']), 'SerializerContext value must be an array');
38
39
$this->values = $params['value'];
40
}
41
42
/**
43
* @return array
44
*/
45
public function getContext()
46
{
47
return $this->values;
48
}
49
50
/**
51
* The name of the annotation or class of annotations
52
*
53
* @return string
54
*/
55
public function getName()
56
{
57
return self::NAME;
58
}
59
60
/**
61
* Whether or not multiple annotations of this type can
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.