Skip to content

Commit 4c921b0

Browse files
committed
fix return datatype
1 parent 4f1539b commit 4c921b0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/Console/ModelsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ public function getPropertiesFromMethods($model)
822822
if ($this->write_model_relation_exists_properties) {
823823
$this->setProperty(
824824
Str::snake($method) . '_exists',
825-
'int|null',
825+
'bool|null',
826826
true,
827827
false
828828
// What kind of comments should be added to the relation count here?

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* @property-read int|null $regular_belongs_to_many_count
1717
* @property-read bool|null $regular_belongs_to_many_exists
1818
* @property-read \Illuminate\Database\Eloquent\Collection|Simple[] $regularHasMany
19+
* @property-read int|null $regular_has_many_count
1920
* @property-read bool|null $regular_has_many_exists
2021
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newModelQuery()
2122
* @method static \Illuminate\Database\Eloquent\Builder<static>|Simple newQuery()

tests/Console/ModelsCommand/Relations/__snapshots__/Test__testRelationNotNullable__1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function nullableMixedWithForeignKeyConstraint(): BelongsTo
162162
* @property-read bool|null $relation_morphed_by_many_exists
163163
* @property-read \Illuminate\Database\Eloquent\Collection<int, Simple> $relationSampleRelationType
164164
* @property-read int|null $relation_sample_relation_type_count
165-
* @property-read boo|null $relation_sample_relation_type_exists
165+
* @property-read bool|null $relation_sample_relation_type_exists
166166
* @property-read Model|\Eloquent $relationSampleToAnyMorphedRelationType
167167
* @property-read \Illuminate\Database\Eloquent\Collection<int, Simple> $relationSampleToAnyRelationType
168168
* @property-read int|null $relation_sample_to_any_relation_type_count

0 commit comments

Comments
 (0)