original_string: public static function fromCheckAndCodeParseFailure(CheckInterface $check, ParseErrorException $e, $file)
      {
          return new static(
              $check->getName(),
              sprintf('File: "%s" could not be parsed. Error: "%s"', $file, $e->getMessage())
          );
      }
code: public static function fromCheckAndCodeParseFailure(CheckInterface $check, ParseErrorException $e, $file)
      {
          return new static(
              $check->getName(),
              sprintf('File: "%s" could not be parsed. Error: "%s"', $file, $e->getMessage())
          );
      }
code_tokens: public static function fromCheckAndCodeParseFailure ( CheckInterface $ check , ParseErrorException $ e , $ file ) { return new static ( $ check -> getName ( ) , sprintf ( 'File: "%s" could not be parsed. Error: "%s"' , $ file , $ e -> getMessage ( ) ) ) ; }
docstring: Static constructor to create from a `PhpParser\Error` exception. Many checks will need to parse the student's
  solution, so this serves as a helper to create a consistent failure.
  
  @param CheckInterface $check The check that attempted to parse the solution.
  @param ParseErrorException $e The parse exception.
  @param string $file The absolute path to the solution.
  @return static The result.
docstring_tokens: Static constructor to create from a PhpParser \ Error exception . Many checks will need to parse the student s solution so this serves as a helper to create a consistent failure .