Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
3 / 3 |
NumericBuildConstraintTrait | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
buildConstraint | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
<?php | |
declare(strict_types=1); | |
namespace Korobochkin\WPKit\DataComponents\Traits\Special\Numeric; | |
use Symfony\Component\Validator\Constraints; | |
/** | |
* Trait NumericBuildConstraintTrait | |
* @package Korobochkin\WPKit\DataComponents\Traits\Special\Numeric | |
*/ | |
trait NumericBuildConstraintTrait | |
{ | |
/** | |
* @return array | |
*/ | |
public function buildConstraint() | |
{ | |
return array( | |
new Constraints\NotBlank(), | |
new Constraints\Type( | |
array( | |
'type' => 'float', | |
) | |
), | |
); | |
} | |
} |