Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Sep 2, 2024
1 parent 71e473c commit 3e81c9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Client/GroupsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function buildCurlPostFields(?Recipient $recipient = null): array
'token' => $this->group->getApplication()->getToken(),
];

if (in_array($this->action, [self::ACTION_ADD_USER, self::ACTION_REMOVE_USER, self::ACTION_DISABLE_USER, self::ACTION_ENABLE_USER], true)) {
if (\in_array($this->action, [self::ACTION_ADD_USER, self::ACTION_REMOVE_USER, self::ACTION_DISABLE_USER, self::ACTION_ENABLE_USER], true)) {
if (!$recipient instanceof Recipient) {
throw new \LogicException('Recipient object must be provided for this action.');
}
Expand All @@ -81,7 +81,7 @@ public function buildCurlPostFields(?Recipient $recipient = null): array
}
}

if (in_array($this->action, [self::ACTION_RENAME_GROUP, self::ACTION_CREATE_GROUP], true)) {
if (\in_array($this->action, [self::ACTION_RENAME_GROUP, self::ACTION_CREATE_GROUP], true)) {
$curlPostFields['name'] = $this->group->getName();
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Client/GroupsClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ public static function buildApiUrlProvider(): iterable
}

/**
* @param array<string, string> $expected
*
* @dataProvider buildCurlPostFieldsProvider
*
* @param array<string, string> $expected
*/
public function testBuildCurlPostFields(array $expected, string $action): void
{
Expand Down

0 comments on commit 3e81c9d

Please sign in to comment.