Code Duplication    Length = 47-47 lines in 2 locations

src/Creational/AbstractFactory/IronTable.php 1 location

@@ 10-56 (lines=47) @@
7
 * Class IronTable
8
 * @package codenixsv\Patterns\Creational\AbstractFactory
9
 */
10
class IronTable implements TableInterface
11
{
12
    /**
13
     * @var int
14
     */
15
    private $wight;
16
17
    /**
18
     * @var int
19
     */
20
    private $height;
21
22
    /**
23
     * WoodenTable constructor.
24
     * @param int $wight
25
     * @param int $height
26
     */
27
    public function __construct(int $wight, int $height)
28
    {
29
        $this->wight = $wight;
30
        $this->height = $height;
31
    }
32
33
    /**
34
     * @return int
35
     */
36
    public function getWight(): int
37
    {
38
        return $this->wight;
39
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getHeight(): int
45
    {
46
        return $this->height;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getMaterial(): string
53
    {
54
        return 'iron';
55
    }
56
}
57

src/Creational/AbstractFactory/WoodenTable.php 1 location

@@ 10-56 (lines=47) @@
7
 * Class WoodenTable
8
 * @package codenixsv\Patterns\Creational\AbstractFactory
9
 */
10
class WoodenTable implements TableInterface
11
{
12
    /**
13
     * @var int
14
     */
15
    private $wight;
16
17
    /**
18
     * @var int
19
     */
20
    private $height;
21
22
    /**
23
     * WoodenTable constructor.
24
     * @param int $wight
25
     * @param int $height
26
     */
27
    public function __construct(int $wight, int $height)
28
    {
29
        $this->wight = $wight;
30
        $this->height = $height;
31
    }
32
33
    /**
34
     * @return int
35
     */
36
    public function getWight(): int
37
    {
38
        return $this->wight;
39
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getHeight(): int
45
    {
46
        return $this->height;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getMaterial(): string
53
    {
54
        return 'wood';
55
    }
56
}
57