Skip to content

Commit

Permalink
Fix changelog, psalm type and add not null check (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Sep 27, 2023
1 parent 5c24a71 commit aa7acbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Expand Up @@ -9,9 +9,9 @@
- Enh #134: Improve handling and control of `Assignment::$createdAt` (@arogachev)
- Chg #134: Add `$createdAt` parameter to `ManagerInterface::assign()` (@arogachev)
- Chg #134: Replace parameters with `$assignment` parameter in `AssignmentsStorageInterface::add()` (@arogachev)
- Enh #165: Improve perfomance (@arogachev)
- Enh #165: Rename `getChildren` method to `getDirectAchildren()` in `ItemsStorage` (@arogachev)
- Enh #165: Add methods to `ItemsStorage`:
- Enh #165: Improve performance (@arogachev)
- Enh #165: Rename `getChildren` method to `getDirectAchildren()` in `ItemsStorageInterface` (@arogachev)
- Enh #165: Add methods to `ItemsStorageInterface`:
- `roleExists()`;
- `getRolesByNames()`;
- `getPermissionsByNames()`;
Expand Down
2 changes: 1 addition & 1 deletion src/ItemsStorageInterface.php
Expand Up @@ -7,7 +7,7 @@
/**
* A storage for RBAC roles and permissions used in {@see Manager}.
*
* @psalm-type ItemsIndexedByName = array<string, Permission|Role>
* @psalm-type ItemsIndexedByName = array<string, Item>
*/
interface ItemsStorageInterface
{
Expand Down
1 change: 1 addition & 0 deletions tests/Common/AssignmentsStorageTestTrait.php
Expand Up @@ -160,6 +160,7 @@ public function testGet(): void
$storage = $this->getAssignmentsStorage();
$assignment = $storage->get('Manager', 'jack');

$this->assertNotNull($assignment);
$this->assertSame('Manager', $assignment->getItemName());
$this->assertSame('jack', $assignment->getUserId());
$this->assertIsInt($assignment->getCreatedAt());
Expand Down

0 comments on commit aa7acbe

Please sign in to comment.