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.

AclFieldUpdate::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 7
c 1
b 0
f 0
nc 2
nop 4
dl 0
loc 11
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
use Soheilrt\AdobeConnectClient\Client\Helpers\StringCaseTransform as SCT;
10
use Soheilrt\AdobeConnectClient\Client\Helpers\ValueTransform as VT;
11
12
/**
13
 * Updates the passed in field-id for the specified SCO, Principal or Account.
14
 *
15
 * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/acl-field-update.html}
16
 */
17
class AclFieldUpdate extends Command
18
{
19
    /**
20
     * @var array
21
     */
22
    protected $parameters;
23
24
    /**
25
     * @param int                     $aclId
26
     * @param string                  $fieldId
27
     * @param mixed                   $value
28
     * @param ArrayableInterface|null $extraParams
29
     */
30
    public function __construct($aclId, $fieldId, $value, ArrayableInterface $extraParams = null)
31
    {
32
        $this->parameters = [
33
            'action'   => 'acl-field-update',
34
            'acl-id'   => $aclId,
35
            'field-id' => SCT::toHyphen($fieldId),
36
            'value'    => VT::toString($value),
37
        ];
38
39
        if ($extraParams) {
40
            $this->parameters += $extraParams->toArray();
41
        }
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     *
47
     * @return bool
48
     */
49
    protected function process()
50
    {
51
        $response = Converter::convert(
52
            $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

52
            $this->client->/** @scrutinizer ignore-call */ 
53
                           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...
53
                $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

53
                $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...
54
            )
55
        );
56
        StatusValidate::validate($response['status']);
57
58
        return true;
59
    }
60
}
61