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.

Issues (66)

src/Client/Commands/ScoContents.php (2 issues)

Labels
Severity
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\Entities\SCO;
9
use Soheilrt\AdobeConnectClient\Client\Helpers\SetEntityAttributes as FillObject;
10
use Soheilrt\AdobeConnectClient\Client\Helpers\StatusValidate;
11
12
/**
13
 * Get the SCO Contents from a folder or from other SCO.
14
 *
15
 * Use the filter to reduce excessive data returns.
16
 *
17
 * More info see {@link https://helpx.adobe.com/content/help/en/adobe-connect/webservices/sco-contents.html}
18
 */
19
class ScoContents extends Command
20
{
21
    /**
22
     * @var array
23
     */
24
    protected $parameters;
25
26
    /**
27
     * @var SCO|mixed
28
     */
29
    protected $sco;
30
31
    /**
32
     * @param int                     $scoId
33
     * @param ArrayableInterface|null $filter
34
     * @param ArrayableInterface|null $sorter
35
     */
36
    public function __construct($scoId, ArrayableInterface $filter = null, ArrayableInterface $sorter = null)
37
    {
38
        $this->parameters = [
39
            'action' => 'sco-contents',
40
            'sco-id' => (int) $scoId,
41
        ];
42
43
        if ($filter) {
44
            $this->parameters += $filter->toArray();
45
        }
46
47
        if ($sorter) {
48
            $this->parameters += $sorter->toArray();
49
        }
50
        $this->sco = $this->getEntity('sco');
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     *
56
     * @return SCO[]
57
     */
58
    protected function process()
59
    {
60
        $response = Converter::convert(
61
            $this->client->doGet($this->parameters + ['session' => $this->client->getSession()])
0 ignored issues
show
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

61
            $this->client->/** @scrutinizer ignore-call */ 
62
                           doGet($this->parameters + ['session' => $this->client->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...
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

61
            $this->client->doGet($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...
62
        );
63
64
        StatusValidate::validate($response['status']);
65
66
        $scos = [];
67
68
        foreach ($response['scos'] as $scoAttributes) {
69
            $sco = new $this->sco();
70
            FillObject::setAttributes($sco, $scoAttributes);
71
            $scos[] = $sco;
72
        }
73
74
        return $scos;
75
    }
76
}
77