Post   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
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\ProductPostRequestValidatorInterface;
14
15
/**
16
 * Class Post
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 Post implements RequestValidatorInterface, ProductPostRequestValidatorInterface
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...\Validator\Product\Post: $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