1 | <?php |
||
11 | class Event |
||
12 | { |
||
13 | /** @var Google_Service_Calendar_Event */ |
||
14 | public $googleEvent; |
||
15 | |||
16 | /** @var int */ |
||
17 | protected $calendarId; |
||
18 | |||
19 | public static function createFromGoogleCalendarEvent(Google_Service_Calendar_Event $googleEvent, $calendarId) |
||
29 | |||
30 | public static function create(array $properties, $calendarId = null) |
||
42 | |||
43 | public function __construct() |
||
47 | |||
48 | /** |
||
49 | * @param string $name |
||
50 | * @return mixed |
||
51 | */ |
||
52 | public function __get($name) |
||
72 | |||
73 | public function __set($name, $value) |
||
85 | |||
86 | /** |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function exists() |
||
93 | |||
94 | /** |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function isAllDayEvent() |
||
101 | |||
102 | /** |
||
103 | * @param \Carbon\Carbon|null $startDateTime |
||
104 | * @param \Carbon\Carbon|null $endDateTime |
||
105 | * @param array $queryParameters |
||
106 | * @param string|null $calendarId |
||
107 | * |
||
108 | * @return \Illuminate\Support\Collection |
||
109 | */ |
||
110 | public static function get(Carbon $startDateTime = null, Carbon $endDateTime = null, array $queryParameters = [], string $calendarId = null) : Collection |
||
121 | |||
122 | /** |
||
123 | * @param string $id |
||
124 | * @param string $calendarId |
||
125 | * |
||
126 | * @return \Spatie\GoogleCalendar\Event |
||
127 | */ |
||
128 | public static function find($id, $calendarId = null) : Event |
||
136 | |||
137 | /** |
||
138 | * @return mixed |
||
139 | */ |
||
140 | public function save() : Event |
||
150 | |||
151 | /** |
||
152 | * @param string $id |
||
153 | * |
||
154 | * @return mixed |
||
155 | */ |
||
156 | public function delete($id = null) |
||
160 | |||
161 | /** |
||
162 | * @param string $calendarId |
||
163 | * |
||
164 | * @return \Spatie\GoogleCalendar\GoogleCalendar |
||
165 | */ |
||
166 | protected static function getGoogleCalendar($calendarId = null) : GoogleCalendar |
||
172 | |||
173 | /** |
||
174 | * @param string $name |
||
175 | * @param \Carbon\Carbon $date |
||
176 | */ |
||
177 | protected function setDateProperty($name, Carbon $date) |
||
197 | |||
198 | /** |
||
199 | * @param $name |
||
200 | * |
||
201 | * @return string |
||
202 | */ |
||
203 | protected function translateFieldName($name) |
||
227 | |||
228 | public function getSortDate() : Carbon |
||
236 | } |
||
237 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.