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.

PrincipalDelete   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A process() 0 13 1
A __construct() 0 3 1
1
<?php
2
3
namespace Soheilrt\AdobeConnectClient\Client\Commands;
4
5
use Soheilrt\AdobeConnectClient\Client\Abstracts\Command;
6
use Soheilrt\AdobeConnectClient\Client\Converter\Converter;
7
use Soheilrt\AdobeConnectClient\Client\Helpers\StatusValidate;
8
9
/**
10
 * Remove one principal, either user or group.
11
 *
12
 * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/principals-delete.html}
13
 */
14
class PrincipalDelete extends Command
15
{
16
    /**
17
     * @var int
18
     */
19
    protected $principalId;
20
21
    /**
22
     * @param int $principalId
23
     */
24
    public function __construct($principalId)
25
    {
26
        $this->principalId = (int) $principalId;
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     *
32
     * @return bool
33
     */
34
    protected function process()
35
    {
36
        $response = Converter::convert(
37
            $this->client->doGet([
0 ignored issues
show
Bug introduced by
The method doGet() does not exist on Soheilrt\AdobeConnectCli...lient\Abstracts\Command. ( Ignorable by Annotation )

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

37
            $this->client->/** @scrutinizer ignore-call */ 
38
                           doGet([

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
38
                'action'       => 'principals-delete',
39
                'principal-id' => $this->principalId,
40
                'session'      => $this->client->getSession(),
0 ignored issues
show
Bug introduced by
The method getSession() does not exist on Soheilrt\AdobeConnectCli...lient\Abstracts\Command. ( Ignorable by Annotation )

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

40
                'session'      => $this->client->/** @scrutinizer ignore-call */ getSession(),

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
41
            ])
42
        );
43
44
        StatusValidate::validate($response['status']);
45
46
        return true;
47
    }
48
}
49