ApiGetMediator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 2
b 0
f 0
dl 0
loc 27
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
A info() 0 3 1
A list() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Api Class
6
 * @category    Ticaje
7
 * @author      Max Demian <[email protected]>
8
 */
9
10
namespace Ticaje\AeSdk\Api\Traits\Mediator;
11
12
use Ticaje\AeSdk\Infrastructure\Interfaces\Provider\Request\RequestDtoInterface as DtoInterface;
13
use Ticaje\Contract\Patterns\Interfaces\Decorator\DecoratorInterface;
14
15
/**
16
 * Trait ApiGetMediator
17
 * @package Ticaje\AeSdk\Api\Traits\Mediator
18
 */
19
trait ApiGetMediator
20
{
21
    /**
22
     * @inheritDoc
23
     * Fetch a list of {resource} from AE API.
24
     */
25
    public function list(DtoInterface $generalRequest, array $serviceRequest): DecoratorInterface
26
    {
27
        return $this->launch($generalRequest, $serviceRequest, __FUNCTION__);
0 ignored issues
show
Bug introduced by
It seems like launch() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
        return $this->/** @scrutinizer ignore-call */ launch($generalRequest, $serviceRequest, __FUNCTION__);
Loading history...
28
    }
29
30
    /**
31
     * @inheritDoc
32
     * Fetch {resource} details from AE API.
33
     */
34
    public function get(DtoInterface $generalRequest, array $serviceRequest): DecoratorInterface
35
    {
36
        return $this->launch($generalRequest, $serviceRequest, __FUNCTION__);
37
    }
38
39
    /**
40
     * @inheritDoc
41
     * Fetch {resource} details from AE API.
42
     */
43
    public function info(DtoInterface $generalRequest, array $serviceRequest): DecoratorInterface
44
    {
45
        return $this->launch($generalRequest, $serviceRequest, __FUNCTION__);
46
    }
47
}
48