| Total Complexity | 1 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | trait AssertMetaObject |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Asserts that a json fragment is a valid meta object. |
||
| 14 | * |
||
| 15 | * It will do the following checks : |
||
| 16 | * 1) asserts that the meta object is not an array of objects (@see assertIsNotArrayOfObjects). |
||
| 17 | * 2) asserts that each member of the meta object is valid (@see assertIsValidMemberName). |
||
| 18 | * |
||
| 19 | * @param array $json |
||
| 20 | * @param boolean $strict If true, unsafe characters are not allowed when checking members name. |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | * @throws \PHPUnit\Framework\AssertionFailedError |
||
| 24 | */ |
||
| 25 | 15 | public static function assertIsValidMetaObject($json, bool $strict): void |
|
| 30 |