Get   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A filterLogic() 0 3 3
A getRequest() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Request Provider Class
6
 * @category    Ticaje
7
 * @author      Max Demian <[email protected]>
8
 */
9
10
namespace Ticaje\AeSdk\Domain\Endpoint\Solution\Seller\Category\Tree;
11
12
use Ticaje\Contract\Patterns\Interfaces\Pool\WorkerInterface;
13
use Ticaje\Contract\Traits\BaseDto;
14
use Ticaje\AeSdk\Infrastructure\Builder\ServiceRequestBuilder;
15
use Ticaje\AeSdk\Domain\Interfaces\Request\ServiceRequestInterface;
16
17
/**
18
 * Class Get
19
 * @package Ticaje\AeSdk\Domain\Endpoint\Solution\Seller\Category\Tree
20
 */
21
class Get implements ServiceRequestInterface, WorkerInterface
22
{
23
    use BaseDto, ServiceRequestBuilder;
24
25
    private $apiMethodName = 'aliexpress.solution.seller.category.tree.query';
0 ignored issues
show
introduced by
The private property $apiMethodName is not used, and could be removed.
Loading history...
26
27
    private $categoryId = 509;
0 ignored issues
show
introduced by
The private property $categoryId is not used, and could be removed.
Loading history...
28
29
    private $filterNoPermission = true;
30
31
    public function getRequest(): array
32
    {
33
        $this->filterLogic();
34
        $request = $this->build();
35
        return $request;
36
    }
37
38
    private function filterLogic()
39
    {
40
        $this->filterNoPermission = (!is_bool($this->filterNoPermission) ? $this->filterNoPermission : ($this->filterNoPermission ? 'true' : 'false'));
0 ignored issues
show
introduced by
The condition is_bool($this->filterNoPermission) is always true.
Loading history...
41
    }
42
}
43