Skip to content

Commit 9a5b611

Browse files
author
Pantea Marius-ciclistu
committed
1 parent da5e773 commit 9a5b611

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Models/BaseModel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ public function lockUpdates(bool $checkDirty = true): bool
624624
*
625625
* To reset the model's $attributes and get the changes from dirty applied during the lock use:
626626
*
627-
* if ($this->unlockUpdate()) {
627+
* if ($this->unlockUpdates()) {
628628
* $dirty = $this->getDirty();
629629
* $this->attributes = $this->original;
630630
* $this->classCastCache = [];
@@ -633,9 +633,9 @@ public function lockUpdates(bool $checkDirty = true): bool
633633
*
634634
* Note that relations can be loaded during the lock
635635
*/
636-
public function unlockUpdate(): bool
636+
public function unlockUpdates(): bool
637637
{
638-
if ($this->isUnlockedForUpdate()) {
638+
if ($this->hasUnlockedUpdates()) {
639639
return false;
640640
}
641641

@@ -644,7 +644,7 @@ public function unlockUpdate(): bool
644644
return true;
645645
}
646646

647-
public function isUnlockedForUpdate(): bool
647+
public function hasUnlockedUpdates(): bool
648648
{
649649
return $this->tmpDirtyIfAttributesAreSyncedFromCashedCasts !== [];
650650
}

src/Models/ExcessiveSetOptimizerOnSaveTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ public function lockUpdates(bool $checkDirty = true): bool
113113
*
114114
* Note that relations can be loaded during the lock
115115
*/
116-
public function unlockUpdate(): bool
116+
public function unlockUpdates(): bool
117117
{
118-
if ($this->isUnlockedForUpdate()) {
118+
if ($this->hasUnlockedUpdates()) {
119119
return false;
120120
}
121121

@@ -124,7 +124,7 @@ public function unlockUpdate(): bool
124124
return true;
125125
}
126126

127-
public function isUnlockedForUpdate(): bool
127+
public function hasUnlockedUpdates(): bool
128128
{
129129
return $this->tmpDirtyIfAttributesAreSyncedFromCashedCasts !== [];
130130
}

0 commit comments

Comments
 (0)