From 0945747c7376f602182122978d493faa25e3dc79 Mon Sep 17 00:00:00 2001 From: ildyria Date: Mon, 10 Jun 2024 00:59:12 +0200 Subject: [PATCH] formatting --- src/AncestorsRelation.php | 8 ++++---- src/BaseRelation.php | 14 +++++++------- src/Collection.php | 2 +- src/DescendantsRelation.php | 8 ++++---- src/Node.php | 6 ++++-- src/QueryBuilder.php | 16 ++++++++-------- 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/AncestorsRelation.php b/src/AncestorsRelation.php index 47c3231..914df91 100644 --- a/src/AncestorsRelation.php +++ b/src/AncestorsRelation.php @@ -7,11 +7,11 @@ /** * @template Tmodelkey * @template Tmodel of Model - * + * * @phpstan-type NodeModel Node&Tmodel - * + * * @disregard P1037 - * + * * @extends BaseRelation */ class AncestorsRelation extends BaseRelation @@ -44,7 +44,7 @@ protected function matches(Model $model, $related): bool /** * @param QueryBuilder $query - * @param NodeModel $model + * @param NodeModel $model * * @return void */ diff --git a/src/BaseRelation.php b/src/BaseRelation.php index cdae4e0..df732c6 100644 --- a/src/BaseRelation.php +++ b/src/BaseRelation.php @@ -13,7 +13,7 @@ * @template Tmodel of Model * * @phpstan-type NodeModel Node&Tmodel - * + * * @extends Relation * * @property NodeModel $related @@ -44,7 +44,7 @@ abstract class BaseRelation extends Relation * AncestorsRelation constructor. * * @param QueryBuilder $builder - * @param NodeModel $model + * @param NodeModel $model */ public function __construct(QueryBuilder $builder, Model $model) { @@ -65,7 +65,7 @@ abstract protected function matches(Model&Node $model, Node $related): bool; /** * @param QueryBuilder $query - * @param NodeModel $model + * @param NodeModel $model * * @return void */ @@ -84,7 +84,7 @@ abstract protected function relationExistenceCondition(string $hash, string $tab /** * @param EloquentBuilder $query * @param EloquentBuilder $parentQuery - * @param mixed $columns + * @param mixed $columns * * @return QueryBuilder */ @@ -173,9 +173,9 @@ public function addEagerConstraints(array $models) /** * Match the eagerly loaded results to their parents. * - * @param array $models + * @param array $models * @param EloquentCollection $results - * @param string $relation + * @param string $relation * * @return array */ @@ -192,7 +192,7 @@ public function match(array $models, EloquentCollection $results, $relation) } /** - * @param NodeModel $model + * @param NodeModel $model * @param EloquentCollection $results * * @return Collection diff --git a/src/Collection.php b/src/Collection.php index 55af673..cbb45a5 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -148,7 +148,7 @@ public function toFlatTree($root = false): Collection * Flatten a tree into a non recursive array. * * @param Collection $groupedNodes - * @param Tmodelkey $parentId + * @param Tmodelkey $parentId * * @return Collection */ diff --git a/src/DescendantsRelation.php b/src/DescendantsRelation.php index 1029edf..7166082 100644 --- a/src/DescendantsRelation.php +++ b/src/DescendantsRelation.php @@ -7,11 +7,11 @@ /** * @template Tmodelkey * @template Tmodel of Model - * + * * @phpstan-type NodeModel Node&Tmodel - * + * * @disregard P1037 - * + * * @extends BaseRelation */ class DescendantsRelation extends BaseRelation @@ -33,7 +33,7 @@ public function addConstraints() /** * @param QueryBuilder $query - * @param NodeModel $model + * @param NodeModel $model */ protected function addEagerConstraint($query, $model) { diff --git a/src/Node.php b/src/Node.php index c02ce85..7fd43ad 100644 --- a/src/Node.php +++ b/src/Node.php @@ -20,7 +20,7 @@ * * @template Tmodelkey * @template Tmodel of \Illuminate\Database\Eloquent\Model - * + * * @phpstan-type NodeModel Node&Tmodel */ interface Node @@ -152,8 +152,9 @@ public function down(int $amount = 1): bool; /** * @since 2.0 + * * @param QueryBuilder $query - * + * * @return QueryBuilder */ public function newEloquentBuilder(QueryBuilder $query): QueryBuilder; @@ -162,6 +163,7 @@ public function newEloquentBuilder(QueryBuilder $query): QueryBuilder; * Get a new base query that includes deleted nodes. * * @since 1.1 + * * @param (QueryBuilder)|string|null $table * * @return QueryBuilder diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php index 5ce81cc..72e7cf8 100644 --- a/src/QueryBuilder.php +++ b/src/QueryBuilder.php @@ -32,7 +32,7 @@ class QueryBuilder extends Builder * @since 2.0 * * @param Tmodelkey|NodeModel $id - * @param bool $required + * @param bool $required * * @return array */ @@ -58,7 +58,7 @@ public function getNodeData(mixed $id, $required = false) * @since 2.0 * * @param Tmodelkey|NodeModel $id - * @param bool $required + * @param bool $required * * @return array */ @@ -85,8 +85,8 @@ public function whereIsRoot(): QueryBuilder * @since 2.0 * * @param Tmodelkey|NodeModel $id - * @param bool $andSelf - * @param string $boolean + * @param bool $andSelf + * @param string $boolean * * @return QueryBuilder */ @@ -130,7 +130,7 @@ public function whereAncestorOf(mixed $id, bool $andSelf = false, string $boolea /** * @param Tmodelkey|NodeModel $id - * @param bool $andSelf + * @param bool $andSelf * * @return QueryBuilder */ @@ -213,9 +213,9 @@ public function orWhereNodeBetween(array $values) * @since 2.0 * * @param Tmodelkey|NodeModel $id - * @param string $boolean - * @param bool $not - * @param bool $andSelf + * @param string $boolean + * @param bool $not + * @param bool $andSelf * * @return QueryBuilder */