Responder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A error() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Responder Trait
6
 * @category    Ticaje
7
 * @author      Max Demian <[email protected]>
8
 */
9
10
namespace Ticaje\AeSdk\Api\Artifact\Responder;
11
12
use Ticaje\Contract\Traits\BaseDto;
13
14
/**
15
 * Trait Responder
16
 * @package Ticaje\AeSdk\Api\Artifact\Responder
17
 * Success method is implemented on a case by case basis since AE responses follow this approach.
18
 */
19
trait Responder
20
{
21
    use BaseDto;
22
23
    private $success;
24
25
    private $message;
26
27
    private $code;
28
29
    /**
30
     * @param \stdClass $response
31
     */
32
    protected function error(\stdClass $response)
33
    {
34
        $this
35
            ->setSuccess(0)
0 ignored issues
show
Bug introduced by
The method setSuccess() does not exist on Ticaje\AeSdk\Api\Artifact\Responder\Responder. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

35
            ->/** @scrutinizer ignore-call */ 
36
              setSuccess(0)
Loading history...
36
            ->setContent(null)
0 ignored issues
show
Bug introduced by
The method setContent() does not exist on Ticaje\AeSdk\Api\Artifact\Responder\Responder. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

36
            ->/** @scrutinizer ignore-call */ setContent(null)
Loading history...
37
            ->setCode($response->code)
0 ignored issues
show
Bug introduced by
The method setCode() does not exist on Ticaje\AeSdk\Api\Artifact\Responder\Responder. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

37
            ->/** @scrutinizer ignore-call */ setCode($response->code)
Loading history...
38
            ->setMessage($response->msg)
0 ignored issues
show
Bug introduced by
The method setMessage() does not exist on Ticaje\AeSdk\Api\Artifact\Responder\Responder. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

38
            ->/** @scrutinizer ignore-call */ setMessage($response->msg)
Loading history...
39
        ;
40
    }
41
}
42