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...
16
{
17
/**
18
* Имя плагина
19
*
20
* @var string
21
*/
22
protected $name;
23
24
/**
25
* Настройки плагина
26
*
27
* @var array
28
*/
29
protected $options = [];
30
31
/**
32
* Настройки для сериалайзера
33
*
34
* @var SerializerOptions
35
*/
36
protected $serializerOptions;
37
38
/**
39
* Возвращает имя плагина
40
*
41
* @return string
42
*/
43
public function getName()
44
{
45
return $this->name;
46
}
47
48
/**
49
* Устанавливает имя плагина
50
*
51
* @param string $name
52
*
53
* @return $this
54
*/
55
public function setName($name)
56
{
57
$this->name = $name;
58
59
return $this;
60
}
61
62
/**
63
* Возвращает настройки плагина
64
*
65
* @return SerializerOptions
66
*/
67
public function getOptions()
68
{
69
if (null === $this->serializerOptions) {
70
$this->serializerOptions = new SerializerOptions($this->options);
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.