From 96b1b240dc62341ab1cac1da48ace30ecb07bb0b Mon Sep 17 00:00:00 2001 From: Ken Andries Date: Fri, 1 Oct 2021 11:43:31 +0200 Subject: [PATCH] add support for `on`, `onWriteConnection`, `with` on models --- CHANGELOG.md | 1 + src/Console/ModelsCommand.php | 7 +++++-- .../__snapshots__/Test__test__1.php | 3 +++ .../Comment/__snapshots__/Test__test__1.php | 3 +++ .../CustomCollection/__snapshots__/Test__test__1.php | 3 +++ .../CustomDate/__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../DynamicRelations/__snapshots__/Test__test__1.php | 3 +++ .../Factories/__snapshots__/Test__test__1.php | 12 ++++++++++++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../Getter/__snapshots__/Test__test__1.php | 3 +++ .../Ignored/__snapshots__/Test__test__1.php | 3 +++ .../Interfaces/__snapshots__/Test__test__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../MagicWhere/__snapshots__/Test__test__1.php | 3 +++ tests/Console/ModelsCommand/ModelHooks/Test.php | 3 +++ .../Test__testNoinspectionNotPresent__1.php | 3 +++ .../Test__testNoinspectionPresent__1.php | 3 +++ .../__snapshots__/Test__test__1.php | 3 +++ .../Relations/__snapshots__/Test__test__1.php | 6 ++++++ .../__snapshots__/Test__testNoReset__1.php | 3 +++ .../__snapshots__/Test__testReset__1.php | 3 +++ .../__snapshots__/Test__testSmartReset__1.php | 3 +++ .../SoftDeletes/__snapshots__/Test__test__1.php | 3 +++ .../UnionTypes/__snapshots__/Test__test__1.php | 3 +++ .../Variadic/__snapshots__/Test__test__1.php | 3 +++ 34 files changed, 114 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc87c01f2..79115ee0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. - Use platformName to determine db type when casting boolean types [\#1212 / stockalexander](https://github.com/barryvdh/laravel-ide-helper/pull/1212) ### Added +- Add `on`, `onWriteConnection` and `with` to models [\#1260 / douglasdc3](https://github.com/barryvdh/laravel-ide-helper/pull/1260) - Add support of variadic parameters in `ide-helper:models` [\#1234 / shaffe-fr](https://github.com/barryvdh/laravel-ide-helper/pull/1234) ### Changed diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 651f37e7f..b09bdc028 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -588,12 +588,15 @@ public function getPropertiesFromMethods($model) ); $this->setMethod($name, $builder . '|' . $modelName, $args, $comment); } - } elseif (in_array($method, ['query', 'newQuery', 'newModelQuery'])) { + } elseif (in_array($method, ['query', 'newQuery', 'newModelQuery', 'on', 'onWriteConnection', 'with'])) { $builder = $this->getClassNameInDestinationFile($model, get_class($model->newModelQuery())); + $reflection = new \ReflectionMethod($model, $method); + $this->setMethod( $method, - $builder . '|' . $this->getClassNameInDestinationFile($model, get_class($model)) + $builder . '|' . $this->getClassNameInDestinationFile($model, get_class($model)), + $this->getParameters($reflection) ); if ($this->write_model_external_builder_methods) { diff --git a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php index c34f0a879..b3357575d 100644 --- a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php @@ -84,6 +84,8 @@ * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Post newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Post onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Post query() * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value) @@ -158,6 +160,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value) + * @method static \Illuminate\Database\Eloquent\Builder|Post with($relations) * @mixin \Eloquent */ class Post extends Model diff --git a/tests/Console/ModelsCommand/Comment/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/Comment/__snapshots__/Test__test__1.php index 4f530e299..6dcf8eb2f 100644 --- a/tests/Console/ModelsCommand/Comment/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/Comment/__snapshots__/Test__test__1.php @@ -29,8 +29,11 @@ * @method static \Illuminate\Database\Eloquent\Builder|Simple active() Scope a query to only include active users. * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/CustomCollection/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/CustomCollection/__snapshots__/Test__test__1.php index 10818ac0a..a58ba2e8f 100644 --- a/tests/Console/ModelsCommand/CustomCollection/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/CustomCollection/__snapshots__/Test__test__1.php @@ -18,8 +18,11 @@ * @method static SimpleCollection|static[] get($columns = ['*']) * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/CustomDate/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/CustomDate/__snapshots__/Test__test__1.php index cd0e846cd..803c38593 100644 --- a/tests/Console/ModelsCommand/CustomDate/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/CustomDate/__snapshots__/Test__test__1.php @@ -13,9 +13,12 @@ * @property \Carbon\CarbonImmutable|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|CustomDate newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|CustomDate newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|CustomDate on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|CustomDate onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|CustomDate query() * @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|CustomDate with($relations) * @mixin \Eloquent */ class CustomDate extends Model diff --git a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index c6a86ad4e..e86f73f8e 100644 --- a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -89,6 +89,8 @@ * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post newModelQuery() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post newQuery() + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post on($connection = null) + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post onWriteConnection() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post query() * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value) @@ -163,6 +165,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value) + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post with($relations) */ class Post extends \Eloquent {} } diff --git a/tests/Console/ModelsCommand/DynamicRelations/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/DynamicRelations/__snapshots__/Test__test__1.php index b92e1cf3e..deb8de36f 100644 --- a/tests/Console/ModelsCommand/DynamicRelations/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/DynamicRelations/__snapshots__/Test__test__1.php @@ -16,7 +16,10 @@ * @property-read int|null $regular_has_many_count * @method static \Illuminate\Database\Eloquent\Builder|Dynamic newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Dynamic newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Dynamic on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Dynamic onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Dynamic query() + * @method static \Illuminate\Database\Eloquent\Builder|Dynamic with($relations) * @mixin \Eloquent */ class Dynamic extends Model diff --git a/tests/Console/ModelsCommand/Factories/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/Factories/__snapshots__/Test__test__1.php index 6c705147d..87a68a4ae 100644 --- a/tests/Console/ModelsCommand/Factories/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/Factories/__snapshots__/Test__test__1.php @@ -14,7 +14,10 @@ * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\CustomSpace\ModelWithCustomNamespaceFactory factory(...$parameters) * @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace query() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithCustomNamespace with($relations) * @mixin \Eloquent */ class ModelWithCustomNamespace extends Model @@ -46,7 +49,10 @@ protected static function newFactory() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Factories\ModelWithFactoryFactory factory(...$parameters) * @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory query() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithFactory with($relations) * @mixin \Eloquent */ class ModelWithFactory extends Model @@ -65,7 +71,10 @@ class ModelWithFactory extends Model * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories\Factories\ModelWithNestedFactoryFactory factory(...$parameters) * @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory query() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithNestedFactory with($relations) * @mixin \Eloquent */ class ModelWithNestedFactory extends ModelWithFactory @@ -85,7 +94,10 @@ class ModelWithNestedFactory extends ModelWithFactory * * @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory query() + * @method static \Illuminate\Database\Eloquent\Builder|ModelWithoutFactory with($relations) * @mixin \Eloquent */ class ModelWithoutFactory extends Model diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php index aec51c918..7ec8d5e7e 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php @@ -84,6 +84,8 @@ * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Post newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Post onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Post query() * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value) @@ -158,6 +160,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value) + * @method static \Illuminate\Database\Eloquent\Builder|Post with($relations) * @mixin \Eloquent */ class Post extends Model diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php index 8b8389035..951573bd1 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php @@ -84,6 +84,8 @@ * @property \Illuminate\Support\Carbon|null $updatedAt * @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Post newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Post onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Post query() * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value) @@ -158,6 +160,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value) + * @method static \Illuminate\Database\Eloquent\Builder|Post with($relations) * @mixin \Eloquent */ class Post extends Model diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php index 1681ee5a6..0062f37d1 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php @@ -84,6 +84,8 @@ * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Post newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Post onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Post query() * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value) @@ -158,6 +160,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value) + * @method static \Illuminate\Database\Eloquent\Builder|Post with($relations) * @mixin \Eloquent */ final class Post extends Model diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index 0dd210e97..1798a8556 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -92,6 +92,8 @@ * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post isStatus(string $status) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post newModelQuery() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post newQuery() + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post on($connection = null) + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post onWriteConnection() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post query() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereBigIntegerNotNullable($value) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereBigIntegerNullable($value) @@ -166,6 +168,7 @@ * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereUuidNullable($value) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereYearNotNullable($value) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post whereYearNullable($value) + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post with($relations) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post withBool(?bool $booleanVar) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post withBoolDifferently(?bool $booleanVar) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder|Post withBoolTypeHinted(bool $booleanVar) diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php index c63463635..ea9986784 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php @@ -88,6 +88,8 @@ * @method static PostExternalQueryBuilder|Post isStatus(string $status) * @method static PostExternalQueryBuilder|Post newModelQuery() * @method static PostExternalQueryBuilder|Post newQuery() + * @method static PostExternalQueryBuilder|Post on($connection = null) + * @method static PostExternalQueryBuilder|Post onWriteConnection() * @method static PostExternalQueryBuilder|Post query() * @method static PostExternalQueryBuilder|Post whereBigIntegerNotNullable($value) * @method static PostExternalQueryBuilder|Post whereBigIntegerNullable($value) @@ -162,6 +164,7 @@ * @method static PostExternalQueryBuilder|Post whereUuidNullable($value) * @method static PostExternalQueryBuilder|Post whereYearNotNullable($value) * @method static PostExternalQueryBuilder|Post whereYearNullable($value) + * @method static PostExternalQueryBuilder|Post with($relations) * @method static PostExternalQueryBuilder|Post withBool(?bool $booleanVar) * @method static PostExternalQueryBuilder|Post withBoolDifferently(?bool $booleanVar) * @method static PostExternalQueryBuilder|Post withBoolTypeHinted(bool $booleanVar) diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php index 2733d9981..9a98fa218 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php @@ -89,6 +89,8 @@ * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post newQuery() * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post null(string $unusedParam) + * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post onWriteConnection() * @method static \Illuminate\Database\Query\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post query() * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereBigIntegerNotNullable($value) @@ -164,6 +166,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNullable($value) + * @method static \Illuminate\Database\Eloquent\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post with($relations) * @method static \Illuminate\Database\Query\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withTrashed() * @method static \Illuminate\Database\Query\Builder|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withoutTrashed() * @mixin \Eloquent diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php index 453e93396..6f4a80d66 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php @@ -95,6 +95,8 @@ * @method static EloquentBuilder|Post newModelQuery() * @method static EloquentBuilder|Post newQuery() * @method static EloquentBuilder|Post null(string $unusedParam) + * @method static EloquentBuilder|Post on($connection = null) + * @method static EloquentBuilder|Post onWriteConnection() * @method static QueryBuilder|Post onlyTrashed() * @method static EloquentBuilder|Post query() * @method static EloquentBuilder|Post whereBigIntegerNotNullable($value) @@ -170,6 +172,7 @@ * @method static EloquentBuilder|Post whereUuidNullable($value) * @method static EloquentBuilder|Post whereYearNotNullable($value) * @method static EloquentBuilder|Post whereYearNullable($value) + * @method static EloquentBuilder|Post with($relations) * @method static QueryBuilder|Post withTrashed() * @method static QueryBuilder|Post withoutTrashed() * @mixin Eloquent diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php index 2ee5372af..59e892258 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php @@ -89,6 +89,8 @@ * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post newModelQuery() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post newQuery() + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post on($connection = null) + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post onWriteConnection() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post query() * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereBigIntegerNotNullable($value) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereBigIntegerNullable($value) @@ -163,6 +165,7 @@ * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereUuidNullable($value) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereYearNotNullable($value) * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post whereYearNullable($value) + * @method static \Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithFqnInExternalFile\Builders\EMaterialQueryBuilder|Post with($relations) */ class Post extends \Eloquent {} } diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php index 872469a83..af602e399 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php @@ -107,6 +107,8 @@ class Post extends Model * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Post newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Post onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Post query() * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value) @@ -181,6 +183,7 @@ class Post extends Model * @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value) + * @method static \Illuminate\Database\Eloquent\Builder|Post with($relations) * @mixin \Eloquent */ class IdeHelperPost extends \Eloquent {} diff --git a/tests/Console/ModelsCommand/Getter/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/Getter/__snapshots__/Test__test__1.php index ab67d5444..688f96029 100644 --- a/tests/Console/ModelsCommand/Getter/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/Getter/__snapshots__/Test__test__1.php @@ -33,8 +33,11 @@ * @property-read mixed $attribute_without_type * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/Ignored/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/Ignored/__snapshots__/Test__test__1.php index 43f6607ce..02bd2b8fe 100644 --- a/tests/Console/ModelsCommand/Ignored/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/Ignored/__snapshots__/Test__test__1.php @@ -11,7 +11,10 @@ * * @method static \Illuminate\Database\Eloquent\Builder|NotIgnored newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|NotIgnored newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|NotIgnored on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|NotIgnored onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|NotIgnored query() + * @method static \Illuminate\Database\Eloquent\Builder|NotIgnored with($relations) * @mixin \Eloquent */ class NotIgnored extends Model diff --git a/tests/Console/ModelsCommand/Interfaces/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/Interfaces/__snapshots__/Test__test__1.php index c802ced6b..522381d3e 100644 --- a/tests/Console/ModelsCommand/Interfaces/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/Interfaces/__snapshots__/Test__test__1.php @@ -16,7 +16,10 @@ * * @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|User newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|User on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|User onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|User query() + * @method static \Illuminate\Database\Eloquent\Builder|User with($relations) */ class User extends \Eloquent implements \Illuminate\Contracts\Auth\Authenticatable {} } diff --git a/tests/Console/ModelsCommand/LaravelCustomCasts/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/LaravelCustomCasts/__snapshots__/Test__test__1.php index a108dbc84..9b1247adb 100644 --- a/tests/Console/ModelsCommand/LaravelCustomCasts/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/LaravelCustomCasts/__snapshots__/Test__test__1.php @@ -36,6 +36,8 @@ * @property SelfCastingCasterWithStaticDocblockReturn $casted_property_with_static_return_docblock_and_param * @method static \Illuminate\Database\Eloquent\Builder|CustomCast newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|CustomCast newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|CustomCast on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|CustomCast onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|CustomCast query() * @method static \Illuminate\Database\Eloquent\Builder|CustomCast whereCastedPropertyWithParam($value) * @method static \Illuminate\Database\Eloquent\Builder|CustomCast whereCastedPropertyWithReturnDocblock($value) @@ -50,6 +52,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|CustomCast whereCastedPropertyWithoutReturn($value) * @method static \Illuminate\Database\Eloquent\Builder|CustomCast whereExtendedCastedPropertyWithStaticReturnDocblock($value) * @method static \Illuminate\Database\Eloquent\Builder|CustomCast whereExtendedCastedPropertyWithThisReturnDocblock($value) + * @method static \Illuminate\Database\Eloquent\Builder|CustomCast with($relations) * @mixin \Eloquent */ class CustomCast extends Model diff --git a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php index 8c9a81975..437d64e3e 100644 --- a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php @@ -84,7 +84,10 @@ * @property \Illuminate\Support\Carbon|null $updated_at * @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Post newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Post onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Post query() + * @method static \Illuminate\Database\Eloquent\Builder|Post with($relations) * @mixin \Eloquent */ class Post extends Model diff --git a/tests/Console/ModelsCommand/ModelHooks/Test.php b/tests/Console/ModelsCommand/ModelHooks/Test.php index 05ffea2ce..48fe83ee5 100644 --- a/tests/Console/ModelsCommand/ModelHooks/Test.php +++ b/tests/Console/ModelsCommand/ModelHooks/Test.php @@ -78,7 +78,10 @@ public function test(): void * @method static \Illuminate\Database\Eloquent\Builder|Simple custom($custom) * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionNotPresent__1.php b/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionNotPresent__1.php index 25c0e3b6d..dac933eb8 100644 --- a/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionNotPresent__1.php +++ b/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionNotPresent__1.php @@ -12,8 +12,11 @@ * @property integer $id * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionPresent__1.php b/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionPresent__1.php index 9cb1f276a..1b7fd2c4b 100644 --- a/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionPresent__1.php +++ b/tests/Console/ModelsCommand/PHPStormNoInspection/__snapshots__/Test__testNoinspectionPresent__1.php @@ -12,8 +12,11 @@ * @property integer $id * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent * @noinspection PhpFullyQualifiedNameUsageInspection * @noinspection PhpUnnecessaryFullyQualifiedNameInspection diff --git a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php index a108282f3..0051a5bb0 100644 --- a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php @@ -86,6 +86,8 @@ * @property-read \Illuminate\Database\Eloquent\Collection|Post[] $relationHasMany * @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Post newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Post on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Post onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Post query() * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value) @@ -160,6 +162,7 @@ * @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value) * @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value) + * @method static \Illuminate\Database\Eloquent\Builder|Post with($relations) * @mixin \Eloquent */ class Post extends Model diff --git a/tests/Console/ModelsCommand/Relations/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/Relations/__snapshots__/Test__test__1.php index 445901d9d..6980dd981 100644 --- a/tests/Console/ModelsCommand/Relations/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/Relations/__snapshots__/Test__test__1.php @@ -21,12 +21,15 @@ * @property-read BelongsToVariation|null $nullableColumnWithNoForeignKeyConstraint * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation query() * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation whereNotNullColumnWithForeignKeyConstraint($value) * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation whereNotNullColumnWithNoForeignKeyConstraint($value) * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation whereNullableColumnWithForeignKeyConstraint($value) * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation whereNullableColumnWithNoForeignKeyConstraint($value) + * @method static \Illuminate\Database\Eloquent\Builder|BelongsToVariation with($relations) * @mixin \Eloquent */ class BelongsToVariation extends Model @@ -97,8 +100,11 @@ public function nullableColumnWithNoForeignKeyConstraint(): BelongsTo * @property-read Simple $relationSampleToManyRelationType * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testNoReset__1.php b/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testNoReset__1.php index 6e5b18017..ebcf7bd9c 100644 --- a/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testNoReset__1.php +++ b/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testNoReset__1.php @@ -13,8 +13,11 @@ * @property integer $id * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testReset__1.php b/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testReset__1.php index 08f1d063c..75eb4d1e3 100644 --- a/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testReset__1.php +++ b/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testReset__1.php @@ -12,8 +12,11 @@ * @property integer $id * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testSmartReset__1.php b/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testSmartReset__1.php index 3ba9c2b3d..214b054a8 100644 --- a/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testSmartReset__1.php +++ b/tests/Console/ModelsCommand/ResetAndSmartReset/__snapshots__/Test__testSmartReset__1.php @@ -12,8 +12,11 @@ * @property integer $id * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model diff --git a/tests/Console/ModelsCommand/SoftDeletes/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/SoftDeletes/__snapshots__/Test__test__1.php index 167fa0ccf..902c7e1cf 100644 --- a/tests/Console/ModelsCommand/SoftDeletes/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/SoftDeletes/__snapshots__/Test__test__1.php @@ -13,9 +13,12 @@ * @property integer $id * @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|Simple on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|Simple onWriteConnection() * @method static \Illuminate\Database\Query\Builder|Simple onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|Simple query() * @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|Simple with($relations) * @method static \Illuminate\Database\Query\Builder|Simple withTrashed() * @method static \Illuminate\Database\Query\Builder|Simple withoutTrashed() * @mixin \Eloquent diff --git a/tests/Console/ModelsCommand/UnionTypes/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/UnionTypes/__snapshots__/Test__test__1.php index 8f6216450..982079246 100644 --- a/tests/Console/ModelsCommand/UnionTypes/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/UnionTypes/__snapshots__/Test__test__1.php @@ -16,7 +16,10 @@ * @property-read int|null $with_union_type_return_count * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel on($connection = null) + * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel onWriteConnection() * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel query() + * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel with($relations) * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel withNullableUnionTypeParameter(string|int|null $bar) * @method static \Illuminate\Database\Eloquent\Builder|UnionTypeModel withUnionTypeParameter(string|int $bar) * @mixin \Eloquent diff --git a/tests/Console/ModelsCommand/Variadic/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/Variadic/__snapshots__/Test__test__1.php index dd1a3d3d7..598dfed75 100644 --- a/tests/Console/ModelsCommand/Variadic/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/Variadic/__snapshots__/Test__test__1.php @@ -13,10 +13,13 @@ * @property integer $id * @method static Builder|Simple newModelQuery() * @method static Builder|Simple newQuery() + * @method static Builder|Simple on($connection = null) + * @method static Builder|Simple onWriteConnection() * @method static Builder|Simple query() * @method static Builder|Simple whereId($value) * @method static Builder|Simple whereTypedVariadic(int ...$values) * @method static Builder|Simple whereVariadic(...$values) + * @method static Builder|Simple with($relations) * @mixin \Eloquent */ class Simple extends Model