1 | <?php |
||
7 | class ModelsExist implements Rule |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $modelClassName; |
||
11 | |||
12 | /** @var string */ |
||
13 | protected $attribute; |
||
14 | |||
15 | public function __construct(string $modelClassName, string $attribute = 'id') |
||
21 | |||
22 | public function passes($attribute, $value) |
||
32 | |||
33 | public function message() |
||
37 | } |
||
38 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.