1 | <?php |
||
8 | class IsOwnerVoterSpec extends ObjectBehavior |
||
9 | { |
||
10 | /** |
||
11 | * @param \Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token |
||
|
|||
12 | **/ |
||
13 | function let() |
||
16 | |||
17 | function it_should_be_initializable() |
||
21 | |||
22 | function it_should_only_support_IS_OWNER_attribute() |
||
27 | |||
28 | /** |
||
29 | * @param Knp\RadBundle\Security\OwnerInterface $user |
||
30 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
31 | **/ |
||
32 | function it_should_vote_yes_for_owned_object($token, $user, $object) |
||
38 | |||
39 | /** |
||
40 | * @param Knp\RadBundle\Security\OwnerInterface $user |
||
41 | * @param Knp\RadBundle\Security\OwnerInterface $otherUser |
||
42 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
43 | **/ |
||
44 | function it_should_vote_no_for_not_owned_object($token, $user, $otherUser, $object) |
||
50 | |||
51 | /** |
||
52 | * @param Knp\RadBundle\Security\OwnerInterface $user |
||
53 | * @param stdClass $object |
||
54 | **/ |
||
55 | function it_should_abstain_to_vote_for_not_ownable_object($token, $user, $object) |
||
60 | |||
61 | /** |
||
62 | * @param stdClass $user |
||
63 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
64 | **/ |
||
65 | function it_should_abstain_to_vote_for_not_owner_token_user($token, $user, $object) |
||
71 | |||
72 | /** |
||
73 | * @param Knp\RadBundle\Security\OwnerInterface $user |
||
74 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
75 | **/ |
||
76 | function it_should_abstain_to_vote_for_unknown_attribute($token, $user, $object) |
||
82 | |||
83 | /** |
||
84 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
85 | * @param Symfony\Component\Security\Core\User\UserInterface $equatableUser |
||
86 | * @param stdClass $user |
||
87 | **/ |
||
88 | function it_should_vote_yes_for_equal_owners($token, $user, $object, $equatableUser) |
||
99 | |||
100 | /** |
||
101 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
102 | * @param Symfony\Component\Security\Core\User\UserInterface $equatableUser |
||
103 | * @param stdClass $user |
||
104 | **/ |
||
105 | function it_should_vote_no_for_non_equal_owners($token, $user, $object, $equatableUser) |
||
116 | |||
117 | /** |
||
118 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
119 | * @param Symfony\Component\Security\Core\User\UserInterface $equatableUser |
||
120 | * @param stdClass $user |
||
121 | **/ |
||
122 | function it_should_use_isEqualTo_if_possible($token, $user, $object, $equatableUser) |
||
133 | |||
134 | /** |
||
135 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
136 | * @param Knp\RadBundle\Security\OwnerInterface $nonEquatableUser |
||
137 | * @param stdClass $user |
||
138 | **/ |
||
139 | function it_should_not_use_isEqualTo_if_no_UserInterface($token, $user, $object, $nonEquatableUser) |
||
150 | |||
151 | /** |
||
152 | * @param Knp\RadBundle\Security\OwnableInterface $object |
||
153 | * @param Symfony\Component\Security\Core\User\UserInterface $equatableUser |
||
154 | * @param Knp\RadBundle\Security\OwnerInterface $user |
||
155 | **/ |
||
156 | function it_should_not_use_isEqualTo_if_no_EquatableInterface($token, $user, $object, $equatableUser) |
||
163 | } |
||
164 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.