Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
71 | public function hasScope($scope) |
||
72 | { |
||
73 | if (\in_array($scope, $this->scopes, TRUE)) { |
||
74 | return TRUE; |
||
75 | } |
||
76 | |||
77 | static $superiors = [ |
||
78 | 'user:email' => 'user', |
||
79 | 'user:follow' => 'user', |
||
80 | 'notifications' => 'repo', |
||
81 | ]; |
||
82 | |||
83 | if (\array_key_exists($scope, $superiors) && \in_array($superiors[$scope], $this->scopes, TRUE)) { |
||
84 | return TRUE; |
||
85 | } |
||
86 | |||
87 | return FALSE; |
||
88 | } |
||
112 |