Skip to content

Commit 8aad1d2

Browse files
committed
Update Builder.php
1 parent befb277 commit 8aad1d2

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

src/Illuminate/Database/Eloquent/Builder.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,20 +2190,6 @@ public function onClone(Closure $callback)
21902190
return $this;
21912191
}
21922192

2193-
/**
2194-
* Invoke the "on clone" modification callbacks.
2195-
*
2196-
* @return static
2197-
*/
2198-
public function applyOnCloneCallbacks()
2199-
{
2200-
foreach ($this->onCloneCallbacks as $onCloneCallback) {
2201-
$onCloneCallback($this);
2202-
}
2203-
2204-
return $this;
2205-
}
2206-
22072193
/**
22082194
* Force a clone of the underlying query builder when cloning.
22092195
*
@@ -2212,7 +2198,9 @@ public function applyOnCloneCallbacks()
22122198
public function __clone()
22132199
{
22142200
$this->query = clone $this->query;
2215-
2216-
$this->applyOnCloneCallbacks();
2201+
2202+
foreach ($this->onCloneCallbacks as $onCloneCallback) {
2203+
$onCloneCallback($this);
2204+
}
22172205
}
22182206
}

0 commit comments

Comments
 (0)