original_string: protected function getScriptPath() : string
      {
          $class = new \ReflectionClass($this->getClassName());
          $path = $class->getFileName();
          $path = preg_replace('/\.php$/', '.phtml', $path, -1, $count);
  
          if ($count !== 1) {
              throw new \RuntimeException('The class filename does not end with .php');
          }
  
          return $path;
      }
code: protected function getScriptPath() : string
      {
          $class = new \ReflectionClass($this->getClassName());
          $path = $class->getFileName();
          $path = preg_replace('/\.php$/', '.phtml', $path, -1, $count);
  
          if ($count !== 1) {
              throw new \RuntimeException('The class filename does not end with .php');
          }
  
          return $path;
      }
code_tokens: protected function getScriptPath ( ) : string { $ class = new \ ReflectionClass ( $ this -> getClassName ( ) ) ; $ path = $ class -> getFileName ( ) ; $ path = preg_replace ( '/\.php$/' , '.phtml' , $ path , - 1 , $ count ) ; if ( $ count !== 1 ) { throw new \ RuntimeException ( 'The class filename does not end with .php' ) ; } return $ path ; }
docstring: Returns the view script path.
  
  Defaults to the class file path, with a .phtml extension, but can be overridden by child classes.
  
  @return string
  
  @throws \RuntimeException
docstring_tokens: Returns the view script path .