Completed
Pull Request — master (#10)
by
unknown
04:03
created

CreateOrderForEmissionICRequestPerfum   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 62
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 62
loc 62
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
use DateTimeInterface;
8
9 View Code Duplication
final class CreateOrderForEmissionICRequestPerfum 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...
10
{
11
    /**
12
     * @var string Контактное лицо
13
     */
14
    private $contactPerson;
15
    /**
16
     * @var string Способ выпуска товаров в оборот
17
     */
18
    private $releaseMethodType;
19
    /**
20
     * @var string Способ изготовления СИ
21
     */
22
    private $createMethodType;
23
    /**
24
     * @var string Идентификатор производственного заказа
25
     */
26
    private $productionOrderId;
27
28
    /**
29
     * CreateOrderForEmissionICRequestLight constructor.
30
     * @param string $contactPerson
31
     * @param string $releaseMethodType
32
     * @param string $createMethodType
33
     * @param string $productionOrderId
34
     * @param OrderProduct[] $products
35
     */
36
    public function __construct(
37
        string $contactPerson,
38
        string $releaseMethodType,
39
        string $createMethodType,
40
        string $productionOrderId,
41
        array $products
42
    ) {
43
        parent::__construct($products);
44
45
        $this->contactPerson = $contactPerson;
46
        $this->releaseMethodType = $releaseMethodType;
47
        $this->createMethodType = $createMethodType;
48
        $this->productionOrderId = $productionOrderId;
49
    }
50
51
    public function getContactPerson(): string
52
    {
53
        return $this->contactPerson;
54
    }
55
56
    public function getReleaseMethodType(): string
57
    {
58
        return $this->releaseMethodType;
59
    }
60
61
    public function getCreateMethodType(): string
62
    {
63
        return $this->createMethodType;
64
    }
65
66
    public function getProductionOrderId(): string
67
    {
68
        return $this->productionOrderId;
69
    }
70
}