Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…ValidatorChain` can be cloned, as the validator chain is now deep-cloned
  • Loading branch information
Ocramius committed Nov 22, 2014
1 parent a19c484 commit 9ba3524
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ValidatorChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ public function __invoke($value)
return $this->isValid($value);
}

/**
* Deep clone handling
*/
public function __clone()
{
$this->validators = clone $this->validators;
}

/**
* Prepare validator chain for serialization
*
Expand Down

0 comments on commit 9ba3524

Please sign in to comment.