Skip to content

Commit cff244b

Browse files
authored
fix: Fixed wrong doc for softDeletes withTrashed method (#1688)
1 parent 4dfc08a commit cff244b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Console/ModelsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ protected function getSoftDeleteMethods($model)
14111411
if (in_array('Illuminate\\Database\\Eloquent\\SoftDeletes', $traits)) {
14121412
$modelName = $this->getClassNameInDestinationFile($model, get_class($model));
14131413
$builder = $this->getClassNameInDestinationFile($model, \Illuminate\Database\Eloquent\Builder::class);
1414-
$this->setMethod('withTrashed', $builder . '<static>|' . $modelName, []);
1414+
$this->setMethod('withTrashed', $builder . '<static>|' . $modelName, ['bool $withTrashed = true']);
14151415
$this->setMethod('withoutTrashed', $builder . '<static>|' . $modelName, []);
14161416
$this->setMethod('onlyTrashed', $builder . '<static>|' . $modelName, []);
14171417
}

tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
* @method static \Illuminate\Database\Eloquent\Builder<static>|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereUuidNullable($value)
161161
* @method static \Illuminate\Database\Eloquent\Builder<static>|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNotNullable($value)
162162
* @method static \Illuminate\Database\Eloquent\Builder<static>|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post whereYearNullable($value)
163-
* @method static \Illuminate\Database\Eloquent\Builder<static>|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withTrashed()
163+
* @method static \Illuminate\Database\Eloquent\Builder<static>|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withTrashed(bool $withTrashed = true)
164164
* @method static \Illuminate\Database\Eloquent\Builder<static>|\Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithForcedFqn\Models\Post withoutTrashed()
165165
* @mixin \Eloquent
166166
*/

tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
* @method static EloquentBuilder<static>|Post whereUuidNullable($value)
167167
* @method static EloquentBuilder<static>|Post whereYearNotNullable($value)
168168
* @method static EloquentBuilder<static>|Post whereYearNullable($value)
169-
* @method static EloquentBuilder<static>|Post withTrashed()
169+
* @method static EloquentBuilder<static>|Post withTrashed(bool $withTrashed = true)
170170
* @method static EloquentBuilder<static>|Post withoutTrashed()
171171
* @mixin Eloquent
172172
*/

tests/Console/ModelsCommand/SoftDeletes/__snapshots__/Test__test__1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple onlyTrashed()
1717
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple query()
1818
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple whereId($value)
19-
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple withTrashed()
19+
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple withTrashed(bool $withTrashed = true)
2020
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple withoutTrashed()
2121
* @mixin \Eloquent
2222
*/

0 commit comments

Comments
 (0)