File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 66
77declare (strict_types=1 );
88
9+ use Nette \Security \IIdentity ;
910use Nette \Security \Permission ;
11+ use Nette \Security \User ;
1012use 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+ }
You can’t perform that action at this time.
0 commit comments