Put::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Domain Entity Class
6
 * @author Max Demian <[email protected]>
7
 */
8
9
namespace Ticaje\AliexpressConsumer\Domain\Entity\Request\Validator\Product;
10
11
use Ticaje\Contract\Patterns\Interfaces\Decorator\DecoratorInterface;
12
use Ticaje\AliexpressConsumer\Domain\Interfaces\Entity\RequestValidatorInterface;
13
use Ticaje\AliexpressConsumer\Domain\Interfaces\Entity\ProductPutRequestValidatorInterface;
14
15
/**
16
 * Class Put
17
 * @package Ticaje\AliexpressConsumer\Domain\Entity\Request\Validator\Product
18
 * This class could be divided into smaller components for the sake of S.o.C principles but i found it
19
 * almost unnecessary since we come down here to implementation details that from a Domain stand point is not that much relevant.
20
 */
21
class Put implements RequestValidatorInterface, ProductPutRequestValidatorInterface
22
{
23
    use ValidatorTrait;
0 ignored issues
show
introduced by
The trait Ticaje\AliexpressConsume...\Product\ValidatorTrait requires some properties which are not provided by Ticaje\AliexpressConsume...t\Validator\Product\Put: $main_image_urls_list, $sku_info_list
Loading history...
24
25
    private $response;
26
27
    /**
28
     * Post constructor.
29
     * @param DecoratorInterface $response
30
     * Although applying inversion of control adds more coupling to a D.I Framework from a design point of view it's better
31
     * and it's actually the rule of dumb, even when injecting a Dto based component.
32
     */
33
    public function __construct(DecoratorInterface $response)
34
    {
35
        $this->response = $response;
36
    }
37
}
38