Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
48 | public function vote(TokenInterface $token, $object, array $attributes) |
||
49 | { |
||
50 | foreach ($attributes AS $attribute) { |
||
51 | if (!$this->supportsAttribute($attribute)) { |
||
52 | continue; |
||
53 | } |
||
54 | |||
55 | if (in_array($this->request->getClientIp(), $this->whitelisted)) { |
||
56 | return VoterInterface::ACCESS_GRANTED; |
||
57 | } |
||
58 | |||
59 | return VoterInterface::ACCESS_DENIED; |
||
60 | } |
||
61 | |||
62 | return VoterInterface::ACCESS_ABSTAIN; |
||
63 | } |
||
64 | } |
||
65 |