Skip to content

Commit 50cb5d0

Browse files
committed
x
1 parent 432b789 commit 50cb5d0

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ parameters:
99

1010
ignoreErrors:
1111
- # IResponse::setCookie() signature differs in nette/http implementation
12-
identifier: arguments.count
12+
identifier: argument.type
1313
path: src/Bridges/SecurityHttp/CookieStorage.php
1414

1515
- # forward compatibility: getRoles() may return Role objects in future

tests/types/security-types.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
declare(strict_types=1);
88

9+
use Nette\Security\IIdentity;
910
use Nette\Security\Permission;
11+
use Nette\Security\User;
1012
use function PHPStan\Testing\assertType;
1113

1214

@@ -27,3 +29,15 @@ function testPermissionGetResources(Permission $acl): void
2729
{
2830
assertType('list<string>', $acl->getResources());
2931
}
32+
33+
34+
function testIIdentityGetId(IIdentity $identity): void
35+
{
36+
assertType('int|string', $identity->getId());
37+
}
38+
39+
40+
function testUserGetId(User $user): void
41+
{
42+
assertType('int|string|null', $user->getId());
43+
}

0 commit comments

Comments
 (0)