Skip to content

Commit 09bbc06

Browse files
Add template for AclProviderInterface
1 parent 86bb993 commit 09bbc06

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

extension.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ parameters:
44
constant_hassers: true
55
console_application_loader: null
66
stubFiles:
7+
- stubs/AclProviderInterface.stub
78
- stubs/ChoiceLoaderInterface.stub
89
- stubs/Constraint.stub
910
- stubs/ContainerBuilder.stub

stubs/AclProviderInterface.stub

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Symfony\Component\Security\Acl\Model;
4+
5+
use Symfony\Component\Security\Acl\Model\AclInterface;
6+
7+
/**
8+
* @template TAcl of AclInterface
9+
*/
10+
interface AclProviderInterface extends AclProviderInterface
11+
{
12+
/**
13+
* @phpstan-return TAcl
14+
*/
15+
public function findAcl(ObjectIdentityInterface $oid, array $sids = []);
16+
17+
/**
18+
* @phpstan-return \SplObjectStorage<ObjectIdentityInterface, TAcl>
19+
*/
20+
public function findAcls(array $oids, array $sids = []);
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Symfony\Component\Security\Acl\Model;
4+
5+
use Symfony\Component\Security\Acl\Model\MutableAclInterface;
6+
7+
/**
8+
* @extends AclProviderInterface<MutableAclInterface>
9+
*/
10+
interface MutableAclProviderInterface extends AclProviderInterface
11+
{
12+
/**
13+
* @phpstan-return TAcl
14+
*/
15+
public function findAcl(ObjectIdentityInterface $oid, array $sids = []);
16+
17+
/**
18+
* @phpstan-return \SplObjectStorage<ObjectIdentityInterface, TAcl>
19+
*/
20+
public function findAcls(array $oids, array $sids = []);
21+
}

0 commit comments

Comments
 (0)