1 | <?php |
||
8 | class Authorized implements Rule |
||
9 | { |
||
10 | /** @var string */ |
||
11 | protected $ability; |
||
12 | |||
13 | /** @var array */ |
||
14 | protected $arguments; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $className; |
||
18 | |||
19 | /** @var string */ |
||
20 | protected $attribute; |
||
21 | |||
22 | 30 | public function __construct(string $ability, string $className) |
|
28 | |||
29 | 30 | public function passes($attribute, $value): bool |
|
43 | |||
44 | 6 | 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.