GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Payable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A authorizeTransaction() 0 8 1
1
<?php
2
3
namespace Gbowo\Adapter\Paystack\Traits;
4
5
use function GuzzleHttp\json_encode;
6
use Psr\Http\Message\ResponseInterface;
7
8
/**
9
 * @author Lanre Adelowo <[email protected]>
10
 * Class Payable
11
 * @package Gbowo\Adapter\Paystack\Traits
12
 */
13
trait Payable
14
{
15
16
    /**
17
     * @param string $relative
18
     * @param array  $data
19
     * @return \Psr\Http\Message\ResponseInterface
20
     */
21 2
    protected function authorizeTransaction(string $relative, array $data = [])
22
    {
23 2
        return $this->httpClient->post(
0 ignored issues
show
Bug introduced by
The property httpClient does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
24 2
            $this->baseUrl . $relative, [
0 ignored issues
show
Bug introduced by
The property baseUrl does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
25 2
            'body' => json_encode($data)
26
            ]
27
        );
28
    }
29
}
30