| @@ 64-71 (lines=8) @@ | ||
| 61 | $requiredAis = array_diff($this->config->getRequiredAIs(), $ais); |
|
| 62 | $forbiddenAIs = array_intersect($this->config->getForbiddenAIs(), $ais); |
|
| 63 | ||
| 64 | if (count($requiredAis) > 0) { |
|
| 65 | return Resolution::createInvalid([ |
|
| 66 | ErrorCodes::MISSING_AIS => sprintf( |
|
| 67 | 'AIs are missing: "%s"', |
|
| 68 | implode('", "', $requiredAis) |
|
| 69 | ), |
|
| 70 | ]); |
|
| 71 | } |
|
| 72 | ||
| 73 | if (count($forbiddenAIs) > 0) { |
|
| 74 | return Resolution::createInvalid([ |
|
| @@ 73-80 (lines=8) @@ | ||
| 70 | ]); |
|
| 71 | } |
|
| 72 | ||
| 73 | if (count($forbiddenAIs) > 0) { |
|
| 74 | return Resolution::createInvalid([ |
|
| 75 | ErrorCodes::FORBIDDEN_AIS => sprintf( |
|
| 76 | 'AIs are forbidden: "%s"', |
|
| 77 | implode('", "', $forbiddenAIs) |
|
| 78 | ), |
|
| 79 | ]); |
|
| 80 | } |
|
| 81 | ||
| 82 | return Resolution::createValid(); |
|
| 83 | } |
|