| Total Complexity | 6 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class ContainsOnlyAllowedMembers extends Constraint |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Undocumented variable |
||
| 16 | |||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | private $members; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Class constructor. |
||
| 23 | * |
||
| 24 | * @param array $members |
||
| 25 | */ |
||
| 26 | 381 | public function __construct(array $members) |
|
| 29 | 381 | } |
|
| 30 | |||
| 31 | /** |
||
| 32 | * Returns a string representation of the constraint. |
||
| 33 | */ |
||
| 34 | 66 | public function default(): string |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Evaluates the constraint for parameter $json. Returns true if the constraint is met, false otherwise. |
||
| 41 | * |
||
| 42 | * @param mixed $json Value or object to evaluate |
||
| 43 | * |
||
| 44 | * @return boolean |
||
| 45 | */ |
||
| 46 | 381 | public function handle($json): bool |
|
| 61 |