Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
30 | public static function convertToSimpleType($object) |
||
31 | { |
||
32 | if (!$object instanceof TypeMutabilityInterface) { |
||
33 | throw new CmisInvalidArgumentException('Given object must be of type TypeMutabilityInterface'); |
||
34 | } |
||
35 | |||
36 | $result = []; |
||
37 | $result[JSONConstants::JSON_TYPE_TYPE_MUTABILITY_CREATE] = $object->canCreate(); |
||
38 | $result[JSONConstants::JSON_TYPE_TYPE_MUTABILITY_UPDATE] = $object->canUpdate(); |
||
39 | $result[JSONConstants::JSON_TYPE_TYPE_MUTABILITY_DELETE] = $object->canDelete(); |
||
40 | |||
41 | return $result; |
||
42 | } |
||
43 | } |
||
44 |