1 | <?php |
||
9 | class Fullcalendar |
||
10 | { |
||
11 | /** @var string */ |
||
12 | protected $id = 'fullcalendar'; |
||
13 | /** @var array */ |
||
14 | protected $events = []; |
||
15 | /** @var array */ |
||
16 | protected $defaultOptions = [ |
||
17 | 'header' => [ |
||
18 | 'left' => 'prev,next today', |
||
19 | 'center' => 'title', |
||
20 | 'right' => 'month,agendaWeek,agendaDay', |
||
21 | ], |
||
22 | 'firstDay' => 1, |
||
23 | ]; |
||
24 | /** @var array */ |
||
25 | protected $clientOptions = []; |
||
26 | |||
27 | /** |
||
28 | * Renders the view that includes the script files |
||
29 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
30 | */ |
||
31 | public static function renderScriptFiles() |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | public function generate() |
||
45 | |||
46 | /** |
||
47 | * Create the <div> the calendar will be rendered into |
||
48 | * @return string |
||
49 | */ |
||
50 | private function calendar() |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getId() |
||
62 | |||
63 | /** |
||
64 | * @param $id |
||
65 | */ |
||
66 | public function setId($id) |
||
70 | |||
71 | /** |
||
72 | * Get the <script> block to render the calendar |
||
73 | * @return \Illuminate\View\View |
||
74 | */ |
||
75 | private function script() |
||
84 | |||
85 | /** |
||
86 | * @return string |
||
87 | */ |
||
88 | public function getOptionsJson() |
||
99 | |||
100 | |||
101 | /** |
||
102 | * Get the fullcalendar options (not including the events list) |
||
103 | * @return array |
||
104 | */ |
||
105 | public function getOptions() |
||
109 | |||
110 | |||
111 | /** |
||
112 | * @param array $options |
||
113 | */ |
||
114 | public function setOptions(array $options) |
||
118 | |||
119 | /** |
||
120 | * @return array |
||
121 | */ |
||
122 | public function getEvents() |
||
126 | |||
127 | /** |
||
128 | * @param mixed $events |
||
129 | */ |
||
130 | public function setEvents($events) |
||
134 | } |
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: