diff --git a/src/Models/Entity.php b/src/Models/Entity.php index ba96bc3..c87a7b7 100644 --- a/src/Models/Entity.php +++ b/src/Models/Entity.php @@ -1573,7 +1573,7 @@ public function getSiblingsRange($from, $to = null, array $columns = ['*']) * * @return Builder */ - private function buildSiblingQuery(Builder $builder, $id, callable $positionCallback = null) + private function buildSiblingQuery(Builder $builder, $id, ?callable $positionCallback = null) { $parentIdColumn = $this->getParentIdColumn(); $positionColumn = $this->getPositionColumn(); @@ -1759,12 +1759,12 @@ public static function getTreeByQuery(Builder $query, array $columns = ['*']) * Saves models from the given attributes array. * * @param array $tree - * @param EntityInterface $parent + * @param EntityInterface|null $parent * * @return Collection * @throws Throwable */ - public static function createFromArray(array $tree, EntityInterface $parent = null) + public static function createFromArray(array $tree, ?EntityInterface $parent = null) { $entities = [];