Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
45 | private static function assertKnownOperation($operation) |
||
46 | { |
||
47 | $knownOperations = [ |
||
48 | self::OP_TEST, |
||
49 | self::OP_ADD, |
||
50 | self::OP_REMOVE, |
||
51 | self::OP_REPLACE, |
||
52 | self::OP_MOVE, |
||
53 | self::OP_COPY |
||
54 | ]; |
||
55 | |||
56 | if (!in_array($operation, $knownOperations)) { |
||
57 | throw new Operation\Exception('Operation must be one of "'.implode('", "', $knownOperations).'"'); |
||
58 | } |
||
59 | } |
||
60 | } |
||
61 |