| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 21 | 
| Code Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 10 | 
| CRAP Score | 3 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 20 | 27 | public function validateParameters(  | 
            |
| 21 | $contextId,  | 
            ||
| 22 | array &$config  | 
            ||
| 23 |     ) { | 
            ||
| 24 | 27 |         if (isset($config[AbstractCompilerPass::CLASS_PARAMETER])) { | 
            |
| 25 | 22 | return true;  | 
            |
| 26 | }  | 
            ||
| 27 | |||
| 28 | 15 |         if (isset($config[AbstractCompilerPass::SERVICE_PARAMETER])) { | 
            |
| 29 | 14 | return true;  | 
            |
| 30 | }  | 
            ||
| 31 | |||
| 32 | 1 | throw new InvalidDefinitionException(sprintf(  | 
            |
| 33 | 'You have to specify "%s" or "%s" parameters for %s '.  | 
            ||
| 34 | 1 | 'in searching context "%s".',  | 
            |
| 35 | 1 | AbstractCompilerPass::CLASS_PARAMETER,  | 
            |
| 36 | 1 | AbstractCompilerPass::SERVICE_PARAMETER,  | 
            |
| 37 | 1 | AbstractCompilerPass::CRITERIA_COLLECTION_PARAMETER,  | 
            |
| 38 | $contextId  | 
            ||
| 39 | ));  | 
            ||
| 40 | }  | 
            ||
| 41 | }  | 
            ||
| 42 |