Base::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Gateway Class
6
 * @category    Ticaje
7
 * @author      Max Demian <[email protected]>
8
 */
9
10
namespace Ticaje\AConnector\Gateway\Provider;
11
12
use Ticaje\AConnector\Interfaces\ClientInterface;
13
14
/**
15
 * Class Base
16
 * @package Ticaje\AConnector\Gateway\Provider
17
 */
18
abstract class Base
19
{
20
    protected $connector;
21
22
    protected $params;
23
24
    /**
25
     * Base constructor.
26
     * @param ClientInterface $connector
27
     */
28
    public function __construct(
29
        ClientInterface $connector
30
    ) {
31
        $this->connector = $connector;
32
    }
33
34
    public function initialize($credentials)
35
    {
36
        $this->connector->generateClient($credentials);
0 ignored issues
show
Bug introduced by
The method generateClient() does not exist on Ticaje\AConnector\Interfaces\ClientInterface. It seems like you code against a sub-type of Ticaje\AConnector\Interfaces\ClientInterface such as Ticaje\AConnector\Gateway\Client\Rest or Ticaje\AConnector\Gateway\Client\Soap or Ticaje\AConnector\Gateway\Client\Rest or Ticaje\AConnector\Gateway\Client\Soap. ( Ignorable by Annotation )

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

36
        $this->connector->/** @scrutinizer ignore-call */ 
37
                          generateClient($credentials);
Loading history...
37
        return $this;
38
    }
39
}
40