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 | * Update a Principal. |
||||
12 | * |
||||
13 | * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/principal-update.html} |
||||
14 | */ |
||||
15 | class PrincipalUpdate extends Command |
||||
16 | { |
||||
17 | /** |
||||
18 | * @var array |
||||
19 | */ |
||||
20 | protected $parameters; |
||||
21 | |||||
22 | /** |
||||
23 | * @param ArrayableInterface $principal |
||||
24 | */ |
||||
25 | public function __construct(ArrayableInterface $principal) |
||||
26 | { |
||||
27 | $this->parameters = [ |
||||
28 | 'action' => 'principal-update', |
||||
29 | ]; |
||||
30 | |||||
31 | $this->parameters += $principal->toArray(); |
||||
32 | } |
||||
33 | |||||
34 | /** |
||||
35 | * {@inheritdoc} |
||||
36 | * |
||||
37 | * @return bool |
||||
38 | */ |
||||
39 | protected function process() |
||||
40 | { |
||||
41 | foreach (['password', 'type', 'has-children'] as $prohibited) { |
||||
42 | if (isset($this->parameters[$prohibited])) { |
||||
43 | unset($this->parameters[$prohibited]); |
||||
44 | } |
||||
45 | } |
||||
46 | |||||
47 | $response = Converter::convert( |
||||
48 | $this->client->doGet( |
||||
0 ignored issues
–
show
|
|||||
49 | $this->parameters + ['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. ![]() |
|||||
50 | ) |
||||
51 | ); |
||||
52 | StatusValidate::validate($response['status']); |
||||
53 | |||||
54 | return true; |
||||
55 | } |
||||
56 | } |
||||
57 |
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.