original_string: private function failureException(MethodInvocation $invocation, FailureInterface $failure)
      {
          $class = new \ReflectionClass($invocation->getThis());
          $className = $class->implementsInterface(WeavedInterface::class) ? $class->getParentClass()->name : $class->name;
          $errors = json_encode($failure->getMessages());
          $msg = sprintf('%s::%s() %s', $className, $invocation->getMethod()->name, $errors);
  
          return new InvalidArgumentException($msg, 400);
      }
code: private function failureException(MethodInvocation $invocation, FailureInterface $failure)
      {
          $class = new \ReflectionClass($invocation->getThis());
          $className = $class->implementsInterface(WeavedInterface::class) ? $class->getParentClass()->name : $class->name;
          $errors = json_encode($failure->getMessages());
          $msg = sprintf('%s::%s() %s', $className, $invocation->getMethod()->name, $errors);
  
          return new InvalidArgumentException($msg, 400);
      }
code_tokens: private function failureException ( MethodInvocation $ invocation , FailureInterface $ failure ) { $ class = new \ ReflectionClass ( $ invocation -> getThis ( ) ) ; $ className = $ class -> implementsInterface ( WeavedInterface :: class ) ? $ class -> getParentClass ( ) -> name : $ class -> name ; $ errors = json_encode ( $ failure -> getMessages ( ) ) ; $ msg = sprintf ( '%s::%s() %s' , $ className , $ invocation -> getMethod ( ) -> name , $ errors ) ; return new InvalidArgumentException ( $ msg , 400 ) ; }
docstring: Return InvalidArgumentException exception
  
  @param MethodInvocation $invocation
  @param FailureInterface $failure
  
  @return InvalidArgumentException
docstring_tokens: Return InvalidArgumentException exception