1 | <?php |
||
22 | class DatabaseTableGenerator extends Generator |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $inputPath; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * @param string $inputPath |
||
32 | */ |
||
33 | public function __construct($inputPath) |
||
37 | |||
38 | /** |
||
39 | * @param Schema $schema |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function generate(Schema $schema) |
||
67 | } |
||
68 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: