Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
3 / 3 |
ConstraintTrait | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
3 / 3 |
getConstraint | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
setConstraint | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
<?php | |
declare(strict_types=1); | |
namespace Korobochkin\WPKit\DataComponents\Traits; | |
trait ConstraintTrait | |
{ | |
/** | |
* @var array|\Symfony\Component\Validator\Constraint; | |
*/ | |
protected $constraint; | |
public function getConstraint() | |
{ | |
return $this->constraint; | |
} | |
public function setConstraint($constraint) | |
{ | |
$this->constraint = $constraint; | |
return $this; | |
} | |
} |