Skip to content

Commit

Permalink
Fix optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Mar 9, 2023
1 parent afd01a9 commit 4aa48b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ItemsStorage.php
Expand Up @@ -297,20 +297,20 @@ private function getItemByTypeAndName(string $type, string $name): Permission|Ro
* @param string $type Either {@see Item::TYPE_ROLE} or {@see Item::TYPE_PERMISSION}.
* @psalm-param Item::TYPE_* $type
* @param string $name Unique name.
* @param string|null $description Optional description.
* @param string|null $ruleName Optional associated rule name.
* @param int|string $createdAt UNIX timestamp for creation time.
* @param int|string $updatedAt UNIX timestamp for updating time.
* @param string|null $description Optional description.
* @param string|null $ruleName Optional associated rule name.
* @return Permission|Role Either role or permission, depending on initial type specified.
* @psalm-return ($type is Item::TYPE_PERMISSION ? Permission : Role)
*/
private function createItem(
string $type,
string $name,
string|null $description = null,
string|null $ruleName = null,
int|string $createdAt,
int|string $updatedAt,
string|null $description = null,
string|null $ruleName = null,
): Permission|Role
{
return $this->createItemByTypeAndName($type, $name)
Expand Down

0 comments on commit 4aa48b5

Please sign in to comment.