original_string: private function newAction($class, $engine)
      {
          if (!class_exists($engine)) {
              throw new StatusCode\BadRequestException('Could not resolve engine');
          }
  
          try {
              $action = $this->actionFactory->factory($class, $engine);
          } catch (FactoryResolveException $e) {
              throw new StatusCode\BadRequestException($e->getMessage());
          }
  
          if (!$action instanceof ActionInterface) {
              throw new StatusCode\BadRequestException('Could not resolve action');
          }
  
          return $action;
      }
code: private function newAction($class, $engine)
      {
          if (!class_exists($engine)) {
              throw new StatusCode\BadRequestException('Could not resolve engine');
          }
  
          try {
              $action = $this->actionFactory->factory($class, $engine);
          } catch (FactoryResolveException $e) {
              throw new StatusCode\BadRequestException($e->getMessage());
          }
  
          if (!$action instanceof ActionInterface) {
              throw new StatusCode\BadRequestException('Could not resolve action');
          }
  
          return $action;
      }
code_tokens: private function newAction ( $ class , $ engine ) { if ( ! class_exists ( $ engine ) ) { throw new StatusCode \ BadRequestException ( 'Could not resolve engine' ) ; } try { $ action = $ this -> actionFactory -> factory ( $ class , $ engine ) ; } catch ( FactoryResolveException $ e ) { throw new StatusCode \ BadRequestException ( $ e -> getMessage ( ) ) ; } if ( ! $ action instanceof ActionInterface ) { throw new StatusCode \ BadRequestException ( 'Could not resolve action' ) ; } return $ action ; }
docstring: Checks whether the provided class is resolvable and returns an action
  instance
  
  @param string $class
  @param string $engine
  @return \Fusio\Engine\ActionInterface
docstring_tokens: Checks whether the provided class is resolvable and returns an action instance