Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 30e76bc

Browse files
committed
ClassType::__clone() clones traits
1 parent ad7d0a7 commit 30e76bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/PhpGenerator/ClassType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ private function validateNames(array $names): void
662662
public function __clone()
663663
{
664664
$clone = function ($item) { return clone $item; };
665+
$this->traits = array_map($clone, $this->traits);
665666
$this->cases = array_map($clone, $this->cases);
666667
$this->consts = array_map($clone, $this->consts);
667668
$this->properties = array_map($clone, $this->properties);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /