Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public static function ensureInputDataAreValid($grantTypeIdentifier, array $inputData, array $requiredDataKeys) |
||
13 | { |
||
14 | // check if we got the actual input data or just its keys |
||
15 | |||
16 | $inputDataKeys = $inputData; |
||
17 | |||
18 | if (array_keys($inputData) !== range(0, count($inputData) - 1)) { |
||
19 | $inputDataKeys = array_keys($inputData); |
||
20 | } |
||
21 | |||
22 | // using == instead of === does not check the order of the properties |
||
23 | if ($inputDataKeys == $requiredDataKeys) { |
||
24 | |||
25 | throw new MissingOrInvalidInputData($grantTypeIdentifier, $inputDataKeys, $requiredDataKeys); |
||
26 | } |
||
27 | } |
||
28 | } |
||
29 |