Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Oct 23, 2024
1 parent 1fea27b commit dcd86fa
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/AncestorsRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function matches(Model $model, $related): bool

/**
* @param QueryBuilder<Tmodel> $query
* @param NodeModel $model
* @param NodeModel $model
*
* @return void
*/
Expand Down
7 changes: 4 additions & 3 deletions src/BaseRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ abstract class BaseRelation extends Relation
* AncestorsRelation constructor.
*
* @param QueryBuilder<Tmodel> $builder
* @param NodeModel $model
* @param NodeModel $model
*/
public function __construct(QueryBuilder $builder, Model $model)
{
Expand All @@ -64,7 +64,7 @@ abstract protected function matches(Model&Node $model, Node $related): bool;

/**
* @param QueryBuilder<Tmodel> $query
* @param NodeModel $model
* @param NodeModel $model
*
* @return void
*/
Expand Down Expand Up @@ -113,7 +113,7 @@ public function getRelationExistenceQuery(EloquentBuilder $query, EloquentBuilde
* Initialize the relation on a set of models.
*
* @param array<int,NodeModel> $models
* @param string $relation
* @param string $relation
*
* @return array<int,NodeModel>
*/
Expand Down Expand Up @@ -143,6 +143,7 @@ public function getResults()
{
/** @var Collection<NodeModel> */
$result = $this->query->get();

return $result;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function toFlatTree($root = false): Collection
* Flatten a tree into a non recursive array.
*
* @param Collection<Tmodel> $groupedNodes
* @param array-key $parentId
* @param array-key $parentId
*
* @return Collection<Tmodel>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/DescendantsRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function addConstraints()

/**
* @param QueryBuilder<Tmodel> $query
* @param NodeModel $model
* @param NodeModel $model
*/
protected function addEagerConstraint($query, $model)
{
Expand Down
26 changes: 13 additions & 13 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class QueryBuilder extends Builder
* @since 2.0
*
* @param NodeModel $id
* @param bool $required
* @param bool $required
*
* @return array<int,int>
*/
Expand All @@ -57,7 +57,7 @@ public function getNodeData(mixed $id, $required = false)
* @since 2.0
*
* @param NodeModel $id
* @param bool $required
* @param bool $required
*
* @return array<int,int>
*/
Expand All @@ -84,8 +84,8 @@ public function whereIsRoot(): QueryBuilder
* @since 2.0
*
* @param NodeModel $id
* @param bool $andSelf
* @param string $boolean
* @param bool $andSelf
* @param string $boolean
*
* @return QueryBuilder<Tmodel>
*/
Expand Down Expand Up @@ -129,7 +129,7 @@ public function whereAncestorOf(mixed $id, bool $andSelf = false, string $boolea

/**
* @param NodeModel $id
* @param bool $andSelf
* @param bool $andSelf
*
* @return QueryBuilder<Tmodel>
*/
Expand Down Expand Up @@ -212,9 +212,9 @@ public function orWhereNodeBetween(array $values)
* @since 2.0
*
* @param ?NodeModel $id
* @param string $boolean
* @param bool $not
* @param bool $andSelf
* @param string $boolean
* @param bool $not
* @param bool $andSelf
*
* @return QueryBuilder<Tmodel>
*/
Expand Down Expand Up @@ -927,7 +927,7 @@ protected function fixNodes(array &$dictionary, $parent = null)
/**
* @param array<array-key,NodeModel[]> $dictionary
* @param NodeModel[] $updated
* @param ?NodeModel $parentId
* @param ?NodeModel $parentId
* @param int $cut
*
* @return int
Expand Down Expand Up @@ -964,8 +964,8 @@ protected static function reorderNodes(
* If item data does not contain primary key, new node will be created.
*
* @param array<array-key,NodeModel[]>[] $data
* @param bool $delete Whether to delete nodes that exists but not in the data array
* @param ?NodeModel $root
* @param bool $delete Whether to delete nodes that exists but not in the data array
* @param ?NodeModel $root
*
* @return int
*/
Expand Down Expand Up @@ -1012,7 +1012,7 @@ public function rebuildTree(array $data, $delete = false, $root = null)
}

/**
* @param null $root
* @param null $root
* @param array<string,mixed>[] $data
* @param bool $delete
*
Expand All @@ -1027,7 +1027,7 @@ public function rebuildSubtree($root, array $data, $delete = false)
* @param array<array-key,NodeModel[]> $dictionary
* @param array<string,mixed>[] $data
* @param array<array-key,NodeModel> $existing
* @param ?NodeModel $parentId
* @param ?NodeModel $parentId
*/
protected function buildRebuildDictionary(array &$dictionary,
array $data,
Expand Down

0 comments on commit dcd86fa

Please sign in to comment.