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
const NAME = 'response_type';
22
23
/**
24
* @var string
25
*/
26
private $type;
27
28
/**
29
* Constructor
30
*
31
* @param array $params
32
*/
33
public function __construct(array $params)
34
{
35
Tebru\assertThat(isset($params['value']), 'An argument was not passed to a "%s" annotation.', get_class($this));
36
37
$this->type = $params['value'];
38
}
39
40
/**
41
* @return string
42
*/
43
public function getType()
44
{
45
return $this->type;
46
}
47
48
/**
49
* The name of the annotation or class of annotations
50
*
51
* @return string
52
*/
53
public function getName()
54
{
55
return self::NAME;
56
}
57
58
/**
59
* 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.