Skip to content

Commit f1545c7

Browse files
committed
Changed return type for withModId. Added usingModId public accessor. Fixed wrong check for usingModId
1 parent 907bd7d commit f1545c7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Database/Eloquent/FMEloquentBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function editRecord()
168168
}
169169

170170
// set the ModID if that option is set on the model
171-
if ($model->withModId()) {
171+
if ($model->usingModId()) {
172172
$this->query->modId($model->getModId());
173173
}
174174

src/Database/Eloquent/FMModel.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,19 @@ public function setModId($modId): void
224224
/**
225225
* Include the modification Id when editing a record
226226
*/
227-
public function withModId($include = true): self
227+
public function withModId($include = true): static
228228
{
229229
// remove any set ModId if the user wishes to remove it
230230
$this->useModId = $include;
231231

232232
return $this;
233233
}
234234

235+
public function usingModId(): bool
236+
{
237+
return $this->useModId;
238+
}
239+
235240
public function getReadOnlyFields()
236241
{
237242
return $this->readOnlyFields;

0 commit comments

Comments
 (0)