File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -269,21 +269,21 @@ protected function toCollection(array $records = [])
269
269
/**
270
270
* Create a related model instanced.
271
271
*
272
- * @param array $attributes
272
+ * @param mixed $attributes
273
273
*
274
- * @return Model
274
+ * @return Model | null
275
275
*/
276
- protected function toModel ($ attributes = [])
276
+ protected function toModel (mixed $ attributes = []): Model | null
277
277
{
278
278
if ($ attributes === null ) {
279
- return ;
279
+ return null ;
280
280
}
281
281
282
282
$ connection = $ this ->related ->getConnection ();
283
283
284
284
$ model = $ this ->related ->newFromBuilder (
285
285
(array ) $ attributes ,
286
- $ connection ? $ connection ->getName () : null ,
286
+ $ connection? ->getName(),
287
287
);
288
288
289
289
$ model ->setParentRelation ($ this );
You can’t perform that action at this time.
0 commit comments