| Conditions | 3 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 6 | public static function assertIsValidJsonapiObject($jsonapi) |
|
| 17 | { |
||
| 18 | 6 | static::assertIsNotArrayOfObjects( |
|
| 19 | 6 | $jsonapi, |
|
| 20 | 6 | Messages::OBJECT_NOT_ARRAY |
|
| 21 | ); |
||
| 22 | |||
| 23 | 5 | $allowed = ['version', 'meta']; |
|
| 24 | 5 | static::assertContainsOnlyAllowedMembers( |
|
| 25 | 5 | $allowed, |
|
| 26 | 5 | $jsonapi |
|
| 27 | ); |
||
| 28 | |||
| 29 | 4 | if (isset($jsonapi['version'])) { |
|
| 30 | 4 | PHPUnit::assertIsString( |
|
| 31 | 4 | $jsonapi['version'], |
|
| 32 | 4 | Messages::JSONAPI_VERSION_IS_NOT_STRING |
|
| 33 | ); |
||
| 34 | } |
||
| 35 | |||
| 36 | 3 | if (isset($jsonapi['meta'])) { |
|
| 37 | 2 | static::assertIsValidMetaObject($jsonapi['meta']); |
|
|
|
|||
| 38 | } |
||
| 41 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.