| Total Complexity | 6 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class AdhocQueryValidator implements ValidatorInterface |
||
| 9 | { |
||
| 10 | |||
| 11 | private static $INSTANCE; |
||
| 12 | |||
| 13 | public static function instance(): ValidatorInterface |
||
| 19 | } |
||
| 20 | |||
| 21 | public function validate($query) |
||
| 22 | { |
||
| 23 | if ( |
||
| 24 | !Context::getProcessEngineConfiguration()->isEnableExpressionsInAdhocQueries() && |
||
|
|
|||
| 25 | !empty($query->getExpressions()) |
||
| 26 | ) { |
||
| 27 | throw new BadUserRequestException( |
||
| 28 | "Expressions are forbidden in adhoc queries. This behavior can be toggled" |
||
| 29 | . " in the process engine configuration" |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | public static function get(): ValidatorInterface |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
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.