@@ -60,7 +60,7 @@ public function ignoreInvalidFilters(): self
6060 /**
6161 * Validate filters conditionally
6262 */
63- protected function ensureAllFiltersExist ()
63+ protected function ensureAllFiltersExist (): void
6464 {
6565 if (!$ this ->ignoreInvalidFilters ) {
6666 parent ::ensureAllFiltersExist ();
@@ -72,7 +72,7 @@ protected function ensureAllFiltersExist()
7272 *
7373 * @param Collection $includes
7474 */
75- protected function addIncludesToQuery (Collection $ includes )
75+ protected function addIncludesToQuery (Collection $ includes ): void
7676 {
7777 if (!$ this ->request ->has ('include ' )) {
7878 $ includes = $ this ->allowedIncludes ->map (function (AllowedInclude $ allowedInclude ) {
@@ -140,7 +140,7 @@ public function fieldsToAlwaysInclude($fields): self
140140 /**
141141 * Modified to support fields without table name
142142 */
143- protected function ensureAllFieldsExist ()
143+ protected function ensureAllFieldsExist (): void
144144 {
145145 $ modelTable = $ this ->getSubject ()->getModel ()->getTable ();
146146
@@ -170,7 +170,7 @@ protected function ensureAllFieldsExist()
170170 *
171171 * @return array
172172 */
173- protected function getFieldAppends ()
173+ protected function getFieldAppends (): array
174174 {
175175 $ subjectTable = $ this ->getSubject ()->getModel ()->getTable ();
176176
@@ -218,7 +218,7 @@ protected function retrieveFieldsToAppends(array $fields): array
218218 * @param Collection $results
219219 * @return Collection
220220 */
221- protected function addAppendsToResults (Collection $ results )
221+ protected function addAppendsToResults (Collection $ results ): Collection
222222 {
223223 return $ results ->each (function (Model $ result ) {
224224 $ to_append = $ this ->getAllAppends ();
@@ -250,7 +250,7 @@ protected function getAllAppends(): array
250250 /**
251251 * Modified to support fields without table name
252252 */
253- protected function addRequestedModelFieldsToQuery ()
253+ protected function addRequestedModelFieldsToQuery (): void
254254 {
255255 $ modelTableName = $ this ->getModel ()->getTable ();
256256
0 commit comments