Passed
Push — master ( 90a5eb...23c09d )
by
unknown
47s queued 11s
created

CreateOrderForEmissionICRequestShoes   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 61
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 61
loc 61
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 14 14 1
A getContactPerson() 4 4 1
A getReleaseMethodType() 4 4 1
A getCreateMethodType() 4 4 1
A getProductionOrderId() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\OmsClient\V2\Dto;
6
7 View Code Duplication
final class CreateOrderForEmissionICRequestShoes extends CreateOrderForEmissionICRequest
0 ignored issues
show
Duplication introduced by
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...
8
{
9
    /**
10
     * @var string Контактное лицо
11
     */
12
    private $contactPerson;
13
    /**
14
     * @var string Способ выпуска товаров в оборот
15
     */
16
    private $releaseMethodType;
17
    /**
18
     * @var string Способ изготовления СИ
19
     */
20
    private $createMethodType;
21
    /**
22
     * @var string Идентификатор производственного заказа
23
     */
24
    private $productionOrderId;
25
26
    /**
27
     * @param string $contactPerson
28
     * @param string $releaseMethodType
29
     * @param string $createMethodType
30
     * @param string $productionOrderId
31
     * @param OrderProductShoes[] $products
32
     */
33
    public function __construct(
34
        string $contactPerson,
35
        string $releaseMethodType,
36
        string $createMethodType,
37
        string $productionOrderId,
38
        array $products
39
    ) {
40
        parent::__construct($products);
41
42
        $this->contactPerson = $contactPerson;
43
        $this->releaseMethodType = $releaseMethodType;
44
        $this->createMethodType = $createMethodType;
45
        $this->productionOrderId = $productionOrderId;
46
    }
47
48
    public function getContactPerson(): string
49
    {
50
        return $this->contactPerson;
51
    }
52
53
    public function getReleaseMethodType(): string
54
    {
55
        return $this->releaseMethodType;
56
    }
57
58
    public function getCreateMethodType(): string
59
    {
60
        return $this->createMethodType;
61
    }
62
63
    public function getProductionOrderId(): string
64
    {
65
        return $this->productionOrderId;
66
    }
67
}