1 | <?php |
||
8 | class Authorized implements Rule |
||
9 | { |
||
10 | /** @var string */ |
||
11 | protected $ability; |
||
12 | |||
13 | /** @var array */ |
||
14 | protected $arguments; |
||
15 | |||
16 | 24 | /** @var string */ |
|
17 | protected $className; |
||
18 | 24 | ||
19 | /** @var string */ |
||
20 | 24 | protected $attribute; |
|
21 | 24 | ||
22 | public function __construct(string $ability, string $className) |
||
28 | |||
29 | 6 | public function passes($attribute, $value): bool |
|
43 | |||
44 | public function message(): string |
||
54 | } |
||
55 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.