Skip to content

Commit 34e6af1

Browse files
authored
Update Model.php
1 parent c792182 commit 34e6af1

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

src/Jenssegers/Mongodb/Eloquent/Model.php

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -224,42 +224,7 @@ public function getCasts()
224224
{
225225
return $this->casts;
226226
}
227-
228-
/**
229-
* @inheritdoc
230-
*/
231-
public function originalIsEquivalent($key, $current)
232-
{
233-
if (!array_key_exists($key, $this->original)) {
234-
return false;
235-
}
236-
237-
$original = $this->getOriginal($key);
238-
239-
if ($current === $original) {
240-
return true;
241-
}
242-
243-
if (null === $current) {
244-
return false;
245-
}
246-
247-
if ($this->isDateAttribute($key)) {
248-
$current = $current instanceof UTCDateTime ? $this->asDateTime($current) : $current;
249-
$original = $original instanceof UTCDateTime ? $this->asDateTime($original) : $original;
250-
251-
return $current == $original;
252-
}
253-
254-
if ($this->hasCast($key)) {
255-
return $this->castAttribute($key, $current) ===
256-
$this->castAttribute($key, $original);
257-
}
258-
259-
return is_numeric($current) && is_numeric($original)
260-
&& strcmp((string) $current, (string) $original) === 0;
261-
}
262-
227+
263228
/**
264229
* Remove one or more fields.
265230
* @param mixed $columns

0 commit comments

Comments
 (0)