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.

PermissionUpdate::process()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
rs 10
1
<?php
2
3
namespace Soheilrt\AdobeConnectClient\Client\Commands;
4
5
use Soheilrt\AdobeConnectClient\Client\Abstracts\Command;
6
use Soheilrt\AdobeConnectClient\Client\Contracts\ArrayableInterface;
7
use Soheilrt\AdobeConnectClient\Client\Converter\Converter;
8
use Soheilrt\AdobeConnectClient\Client\Helpers\StatusValidate;
9
10
/**
11
 * Updates the principal's permissions to access a SCO or the access mode if the acl-id is a Meeting.
12
 *
13
 * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/permissions-update.html}
14
 * For SCO access mode info see {@link https://helpx.adobe.com/adobe-connect/webservices/common-xml-elements-attributes.html#permission_id}
15
 */
16
class PermissionUpdate extends Command
17
{
18
    /**
19
     * @var array
20
     */
21
    protected $parameters;
22
23
    /**
24
     * @param ArrayableInterface $permission
25
     */
26
    public function __construct(ArrayableInterface $permission)
27
    {
28
        $this->parameters = [
29
            'action' => 'permissions-update',
30
        ];
31
32
        $this->parameters += $permission->toArray();
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     *
38
     * @return bool
39
     */
40
    protected function process()
41
    {
42
        $response = Converter::convert(
43
            $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

43
            $this->client->/** @scrutinizer ignore-call */ 
44
                           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...
44
                $this->parameters + ['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

44
                $this->parameters + ['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...
45
            )
46
        );
47
        StatusValidate::validate($response['status']);
48
49
        return true;
50
    }
51
}
52