1 | <?php |
||
11 | class BuilderResultset extends AbstractResultset |
||
12 | { |
||
13 | /** |
||
14 | * @var \Illuminate\Database\Eloquent\Builder |
||
15 | */ |
||
16 | protected $builder = null; |
||
17 | |||
18 | /** |
||
19 | * @var \Illuminate\Database\Eloquent\Model |
||
20 | */ |
||
21 | private $prototype = null; |
||
22 | |||
23 | /** |
||
24 | * Initialize |
||
25 | * |
||
26 | * @param \Illuminate\Database\Eloquent\Builder $builder Builder |
||
27 | */ |
||
28 | 4 | public function __construct(EloquentBuilder $builder) |
|
34 | |||
35 | /** |
||
36 | * Initialize |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | 4 | public function initialize() |
|
55 | |||
56 | /** |
||
57 | * Get Prototype |
||
58 | * |
||
59 | * @return \Illuminate\Database\Eloquent\Model |
||
60 | */ |
||
61 | 1 | public function getPrototype() |
|
65 | |||
66 | /** |
||
67 | * Get the data |
||
68 | * |
||
69 | * @return object|bool |
||
70 | */ |
||
71 | 2 | public function current() |
|
81 | } |
||
82 |
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: