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\Entities\Principal; |
||||
8 | use Soheilrt\AdobeConnectClient\Client\Helpers\SetEntityAttributes as FillObject; |
||||
9 | use Soheilrt\AdobeConnectClient\Client\Helpers\StatusValidate; |
||||
10 | |||||
11 | /** |
||||
12 | * Provides information about one principal, either a user or a group. |
||||
13 | * |
||||
14 | * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/principal-info.html} |
||||
15 | */ |
||||
16 | class PrincipalInfo extends Command |
||||
17 | { |
||||
18 | /** |
||||
19 | * @var int |
||||
20 | */ |
||||
21 | protected $principalId; |
||||
22 | |||||
23 | /** |
||||
24 | * @var Principal|mixed |
||||
25 | */ |
||||
26 | protected $principal; |
||||
27 | |||||
28 | /** |
||||
29 | * @param int $principalId |
||||
30 | */ |
||||
31 | public function __construct($principalId) |
||||
32 | { |
||||
33 | $this->principalId = (int) $principalId; |
||||
34 | $this->principal = $this->getEntity("principal"); |
||||
35 | } |
||||
36 | |||||
37 | /** |
||||
38 | * {@inheritdoc} |
||||
39 | * |
||||
40 | * @return Principal |
||||
41 | */ |
||||
42 | protected function process() |
||||
43 | { |
||||
44 | $response = Converter::convert( |
||||
45 | $this->client->doGet([ |
||||
0 ignored issues
–
show
|
|||||
46 | 'action' => 'principal-info', |
||||
47 | 'principal-id' => $this->principalId, |
||||
48 | 'session' => $this->client->getSession(), |
||||
0 ignored issues
–
show
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
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. ![]() |
|||||
49 | ]) |
||||
50 | ); |
||||
51 | |||||
52 | StatusValidate::validate($response['status']); |
||||
53 | |||||
54 | $principal = new $this->principal(); |
||||
55 | FillObject::setAttributes($principal, $response['principal']); |
||||
56 | |||||
57 | return $principal; |
||||
58 | } |
||||
59 | } |
||||
60 |
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.