| 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\Helpers\StatusValidate; |
||||
| 8 | use Soheilrt\AdobeConnectClient\Client\Helpers\ValueTransform as VT; |
||||
| 9 | |||||
| 10 | /** |
||||
| 11 | * Adds one principal to a group, or removes one principal from a group. |
||||
| 12 | * |
||||
| 13 | * More info see {@link https://helpx.adobe.com/adobe-connect/webservices/group-membership-update.html} |
||||
| 14 | */ |
||||
| 15 | class GroupMembershipUpdate extends Command |
||||
| 16 | { |
||||
| 17 | /** |
||||
| 18 | * @var array |
||||
| 19 | */ |
||||
| 20 | protected $parameters; |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * @param int $groupId |
||||
| 24 | * @param int $principalId |
||||
| 25 | * @param bool $isMember |
||||
| 26 | */ |
||||
| 27 | public function __construct($groupId, $principalId, $isMember) |
||||
| 28 | { |
||||
| 29 | $this->parameters = [ |
||||
| 30 | 'action' => 'group-membership-update', |
||||
| 31 | 'group-id' => (int) $groupId, |
||||
| 32 | 'principal-id' => (int) $principalId, |
||||
| 33 | 'is-member' => VT::toString($isMember), |
||||
| 34 | ]; |
||||
| 35 | } |
||||
| 36 | |||||
| 37 | /** |
||||
| 38 | * {@inheritdoc} |
||||
| 39 | * |
||||
| 40 | * @return bool |
||||
| 41 | */ |
||||
| 42 | protected function process() |
||||
| 43 | { |
||||
| 44 | $response = Converter::convert( |
||||
| 45 | $this->client->doGet( |
||||
|
0 ignored issues
–
show
|
|||||
| 46 | $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. Loading history...
|
|||||
| 47 | ) |
||||
| 48 | ); |
||||
| 49 | StatusValidate::validate($response['status']); |
||||
| 50 | |||||
| 51 | return true; |
||||
| 52 | } |
||||
| 53 | } |
||||
| 54 |
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.