diff --git a/src/Eloquent/Relations/Traits/IsCustomizable.php b/src/Eloquent/Relations/Traits/IsCustomizable.php index 3d56422..9afb95f 100644 --- a/src/Eloquent/Relations/Traits/IsCustomizable.php +++ b/src/Eloquent/Relations/Traits/IsCustomizable.php @@ -25,7 +25,7 @@ trait IsCustomizable /** * The custom constraints callback for an eager load of the relation. * - * @var callable(\Illuminate\Database\Eloquent\Builder, array): void + * @var callable(\Illuminate\Database\Eloquent\Builder, array): void */ protected $customEagerConstraintsCallback = null; @@ -65,7 +65,7 @@ public function withCustomThroughKeyCallback(callable $callback): static /** * Set the custom constraints callback for an eager load of the relation. * - * @param callable(\Illuminate\Database\Eloquent\Builder, array): void $callback + * @param callable(\Illuminate\Database\Eloquent\Builder, array): void $callback * @return $this */ public function withCustomEagerConstraintsCallback(callable $callback): static diff --git a/src/Eloquent/Relations/Traits/RetrievesIntermediateTables.php b/src/Eloquent/Relations/Traits/RetrievesIntermediateTables.php index 311d546..07a9aea 100644 --- a/src/Eloquent/Relations/Traits/RetrievesIntermediateTables.php +++ b/src/Eloquent/Relations/Traits/RetrievesIntermediateTables.php @@ -15,7 +15,10 @@ trait RetrievesIntermediateTables /** * The intermediate tables to retrieve. * - * @var array, class: class-string<\Illuminate\Database\Eloquent\Model>, postProcessor: callable|null}> + * @var array, + * class: class-string<\Illuminate\Database\Eloquent\Model>, + * postProcessor: callable(\Illuminate\Database\Eloquent\Model, array): array|null}> */ protected $intermediateTables = []; @@ -44,7 +47,7 @@ public function withIntermediate($class, array $columns = ['*'], $accessor = nul * @param list $columns * @param class-string<\Illuminate\Database\Eloquent\Model> $class * @param string|null $accessor - * @param callable|null $postProcessor + * @param callable(\Illuminate\Database\Eloquent\Model, array): array|null $postProcessor * @return $this */ public function withPivot( @@ -58,6 +61,7 @@ public function withPivot( /** @var \Illuminate\Database\Connection $connection */ $connection = $this->query->getConnection(); + /** @var array $columns */ $columns = $connection->getSchemaBuilder()->getColumnListing($table); } @@ -75,7 +79,7 @@ public function withPivot( /** * Get the intermediate columns for the relation. * - * @return array + * @return array */ protected function intermediateColumns() { @@ -131,7 +135,10 @@ protected function hydrateIntermediateRelations(array $models) * Get the intermediate relationship from the query. * * @param \Illuminate\Database\Eloquent\Model $model - * @param array{table: string, columns: array, class: class-string<\Illuminate\Database\Eloquent\Model>, postProcessor: callable|null} $intermediateTable + * @param array{table: string, + * columns: array, + * class: class-string<\Illuminate\Database\Eloquent\Model>, + * postProcessor: callable(\Illuminate\Database\Eloquent\Model, array): array|null} $intermediateTable * @param string $prefix * @return \Illuminate\Database\Eloquent\Model */ @@ -195,7 +202,7 @@ protected function prefix($accessor) /** * Get the intermediate tables. * - * @return array, class: class-string<\Illuminate\Database\Eloquent\Model>, postProcessor: callable|null}> + * @return array, class: class-string<\Illuminate\Database\Eloquent\Model>, postProcessor: callable|null}> */ public function getIntermediateTables(): array { diff --git a/src/Eloquent/Relations/Traits/SupportsCompositeKeys.php b/src/Eloquent/Relations/Traits/SupportsCompositeKeys.php index b584ed7..14cad0f 100644 --- a/src/Eloquent/Relations/Traits/SupportsCompositeKeys.php +++ b/src/Eloquent/Relations/Traits/SupportsCompositeKeys.php @@ -51,7 +51,7 @@ protected function addConstraintsWithCompositeKey(): void /** * Set the constraints for an eager load of the relation for a leading composite key. * - * @param array<\Illuminate\Database\Eloquent\Model> $models + * @param array $models * @return void */ protected function addEagerConstraintsWithCompositeKey(array $models): void @@ -159,7 +159,7 @@ protected function buildDictionaryWithCompositeKey(Collection $results): array /** * Get the columns to select for a leading composite key. * - * @return array + * @return array */ protected function shouldSelectWithCompositeKey(): array { diff --git a/src/HasManyDeep.php b/src/HasManyDeep.php index 8b1dac3..5eaac57 100644 --- a/src/HasManyDeep.php +++ b/src/HasManyDeep.php @@ -144,7 +144,7 @@ protected function performJoin(?Builder $query = null) * Set the select clause for the relation query. * * @param list $columns - * @return array + * @return array */ protected function shouldSelect(array $columns = ['*']) {