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.

RecordingPasscode   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A process() 0 18 1
1
<?php
2
3
namespace Soheilrt\AdobeConnectClient\Client\Commands;
4
5
use Soheilrt\AdobeConnectClient\Client\Abstracts\Command;
6
use Soheilrt\AdobeConnectClient\Client\Entities\Permission;
7
use Soheilrt\AdobeConnectClient\Client\Parameter;
8
9
/**
10
 * Set the passcode on a Recording and turned into public.
11
 *
12
 * Obs: to set the passcode on a Meeting use the aclFieldUpdate method with the
13
 * meeting-passcode as the fieldId and the passcode as the value.
14
 */
15
class RecordingPasscode extends Command
16
{
17
    /**
18
     * @var int
19
     */
20
    protected $scoId;
21
22
    /**
23
     * @var string
24
     */
25
    protected $passcode;
26
27
    /**
28
     * @var Permission|mixed
29
     */
30
    protected $permission;
31
32
    /**
33
     * @param int    $scoId
34
     * @param string $passcode
35
     */
36
    public function __construct($scoId, $passcode)
37
    {
38
        $this->scoId = (int) $scoId;
39
        $this->passcode = (string) $passcode;
40
        $this->permission = $this->getEntity('permission');
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     *
46
     * @return bool
47
     */
48
    protected function process()
49
    {
50
        $permission = new $this->permission();
51
        $permission->setAclId($this->scoId);
52
        $permission->setPrincipalId(Permission::RECORDING_PUBLIC);
53
        $permission->setPermissionId(Permission::MEETING_PRINCIPAL_PUBLIC_ACCESS);
54
        $this->client->permissionUpdate($permission);
0 ignored issues
show
Bug introduced by
The method permissionUpdate() 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

54
        $this->client->/** @scrutinizer ignore-call */ 
55
                       permissionUpdate($permission);

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...
55
56
        $parameters = Parameter::instance()
57
            ->set('isMtgPasscodeReq', true)
58
            ->set('permissionId', Permission::RECORDING_PUBLIC)
59
            ->set('principalId', Permission::MEETING_PRINCIPAL_PUBLIC_ACCESS);
60
61
        return $this->client->aclFieldUpdate(
0 ignored issues
show
Bug introduced by
The method aclFieldUpdate() 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

61
        return $this->client->/** @scrutinizer ignore-call */ aclFieldUpdate(

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...
62
            $this->scoId,
63
            'meetingPasscode',
64
            $this->passcode,
65
            $parameters
66
        );
67
    }
68
}
69