Code Duplication    Length = 107-107 lines in 2 locations

src/Plugin/Fill/Refiller/Item.php 1 location

@@ 17-123 (lines=107) @@
14
 *
15
 * @author  Peter Gribanov <[email protected]>
16
 */
17
class Item
18
{
19
    /**
20
     * Name.
21
     *
22
     * @var string
23
     */
24
    protected $name = '';
25
26
    /**
27
     * Data for refill item.
28
     *
29
     * @var array
30
     */
31
    protected $data = [];
32
33
    /**
34
     * Source.
35
     *
36
     * Can set the source to source item to avoid the next search for this item
37
     *
38
     * @var string
39
     */
40
    protected $source = '';
41
42
    /**
43
     * Image.
44
     *
45
     * @var string
46
     */
47
    protected $image = '';
48
49
    /**
50
     * Description.
51
     *
52
     * @var string
53
     */
54
    protected $description = '';
55
56
    /**
57
     * Construct.
58
     *
59
     * @param string $name
60
     * @param array $data
61
     * @param string $source
62
     * @param string|null $image
63
     * @param string|null $description
64
     */
65
    public function __construct($name, array $data, $source, $image = '', $description = '')
66
    {
67
        $this->name = $name;
68
        $this->data = $data;
69
        $this->source = $source;
70
        $this->image = $image;
71
        $this->description = $description;
72
    }
73
74
    /**
75
     * Get name.
76
     *
77
     * @return string
78
     */
79
    public function getName()
80
    {
81
        return $this->name;
82
    }
83
84
    /**
85
     * Get data for refill item.
86
     *
87
     * @return array
88
     */
89
    public function getData()
90
    {
91
        return $this->data;
92
    }
93
94
    /**
95
     * Get source.
96
     *
97
     * @return string
98
     */
99
    public function getSource()
100
    {
101
        return $this->source;
102
    }
103
104
    /**
105
     * Get image.
106
     *
107
     * @return string
108
     */
109
    public function getImage()
110
    {
111
        return $this->image;
112
    }
113
114
    /**
115
     * Get description.
116
     *
117
     * @return string
118
     */
119
    public function getDescription()
120
    {
121
        return $this->description;
122
    }
123
}
124

src/Plugin/Fill/Search/Item.php 1 location

@@ 17-123 (lines=107) @@
14
 *
15
 * @author  Peter Gribanov <[email protected]>
16
 */
17
class Item
18
{
19
    /**
20
     * Name.
21
     *
22
     * @var string
23
     */
24
    protected $name = '';
25
26
    /**
27
     * Link to fill item from source.
28
     *
29
     * @var string
30
     */
31
    protected $link = '';
32
33
    /**
34
     * Source.
35
     *
36
     * Can set the source to source item to avoid the next search for this item
37
     *
38
     * @var string
39
     */
40
    protected $source = '';
41
42
    /**
43
     * Image.
44
     *
45
     * @var string
46
     */
47
    protected $image = '';
48
49
    /**
50
     * Description.
51
     *
52
     * @var string
53
     */
54
    protected $description = '';
55
56
    /**
57
     * Construct.
58
     *
59
     * @param string $name
60
     * @param string $link
61
     * @param string $image
62
     * @param string $description
63
     * @param string|null $source
64
     */
65
    public function __construct($name, $link, $image, $description, $source = '')
66
    {
67
        $this->name = $name;
68
        $this->link = $link;
69
        $this->image = $image;
70
        $this->description = $description;
71
        $this->source = $source;
72
    }
73
74
    /**
75
     * Get name.
76
     *
77
     * @return string
78
     */
79
    public function getName()
80
    {
81
        return $this->name;
82
    }
83
84
    /**
85
     * Get link to fill item from source.
86
     *
87
     * @return string
88
     */
89
    public function getLink()
90
    {
91
        return $this->link;
92
    }
93
94
    /**
95
     * Get source.
96
     *
97
     * @return string
98
     */
99
    public function getSource()
100
    {
101
        return $this->source;
102
    }
103
104
    /**
105
     * Get image.
106
     *
107
     * @return string
108
     */
109
    public function getImage()
110
    {
111
        return $this->image;
112
    }
113
114
    /**
115
     * Get description.
116
     *
117
     * @return string
118
     */
119
    public function getDescription()
120
    {
121
        return $this->description;
122
    }
123
}
124