original_string: public static function lastErrorMsg()
      {
          if (is_string(self::$error)) {
              return self::$error;
          }
  
          switch (self::$error) {
              case 0:
                  $msg = 'No Error';
                  break;
  
              case self::EXISTS:
                  $msg = 'The target path "' . self::$target . '" already exists';
                  break;
  
              case self::IS_LINK:
                  $msg = 'The target path "' . self::$target . '" is a symbolic link';
                  break;
  
              case self::NOT_FOUND:
                  $msg = 'The target path "' . self::$target . '" does not appear to exist';
                  break;
  
              case self::NOT_DIRECTORY:
                  $msg = 'The target path "' . self::$target . '" does not appear to be a folder';
                  break;
  
              case self::NOT_GRAV_ROOT:
                  $msg = 'The target path "' . self::$target . '" does not appear to be a Grav instance';
                  break;
  
              case self::ZIP_OPEN_ERROR:
                  $msg = 'Unable to open the package file';
                  break;
  
              case self::ZIP_EXTRACT_ERROR:
                  $msg = 'Unable to extract the package. ';
                  if (self::$error_zip) {
                      switch(self::$error_zip) {
                          case \ZipArchive::ER_EXISTS:
                              $msg .= 'File already exists.';
                              break;
  
                          case \ZipArchive::ER_INCONS:
                              $msg .= 'Zip archive inconsistent.';
                              break;
  
                          case \ZipArchive::ER_MEMORY:
                              $msg .= 'Memory allocation failure.';
                              break;
  
                          case \ZipArchive::ER_NOENT:
                              $msg .= 'No such file.';
                              break;
  
                          case \ZipArchive::ER_NOZIP:
                              $msg .= 'Not a zip archive.';
                              break;
  
                          case \ZipArchive::ER_OPEN:
                              $msg .= "Can't open file.";
                              break;
  
                          case \ZipArchive::ER_READ:
                              $msg .= 'Read error.';
                              break;
  
                          case \ZipArchive::ER_SEEK:
                              $msg .= 'Seek error.';
                              break;
                      }
                  }
                  break;
  
              case self::INVALID_SOURCE:
                  $msg = 'Invalid source file';
                  break;
  
              default:
                  $msg = 'Unknown Error';
                  break;
          }
  
          return $msg;
      }
code: public static function lastErrorMsg()
      {
          if (is_string(self::$error)) {
              return self::$error;
          }
  
          switch (self::$error) {
              case 0:
                  $msg = 'No Error';
                  break;
  
              case self::EXISTS:
                  $msg = 'The target path "' . self::$target . '" already exists';
                  break;
  
              case self::IS_LINK:
                  $msg = 'The target path "' . self::$target . '" is a symbolic link';
                  break;
  
              case self::NOT_FOUND:
                  $msg = 'The target path "' . self::$target . '" does not appear to exist';
                  break;
  
              case self::NOT_DIRECTORY:
                  $msg = 'The target path "' . self::$target . '" does not appear to be a folder';
                  break;
  
              case self::NOT_GRAV_ROOT:
                  $msg = 'The target path "' . self::$target . '" does not appear to be a Grav instance';
                  break;
  
              case self::ZIP_OPEN_ERROR:
                  $msg = 'Unable to open the package file';
                  break;
  
              case self::ZIP_EXTRACT_ERROR:
                  $msg = 'Unable to extract the package. ';
                  if (self::$error_zip) {
                      switch(self::$error_zip) {
                          case \ZipArchive::ER_EXISTS:
                              $msg .= 'File already exists.';
                              break;
  
                          case \ZipArchive::ER_INCONS:
                              $msg .= 'Zip archive inconsistent.';
                              break;
  
                          case \ZipArchive::ER_MEMORY:
                              $msg .= 'Memory allocation failure.';
                              break;
  
                          case \ZipArchive::ER_NOENT:
                              $msg .= 'No such file.';
                              break;
  
                          case \ZipArchive::ER_NOZIP:
                              $msg .= 'Not a zip archive.';
                              break;
  
                          case \ZipArchive::ER_OPEN:
                              $msg .= "Can't open file.";
                              break;
  
                          case \ZipArchive::ER_READ:
                              $msg .= 'Read error.';
                              break;
  
                          case \ZipArchive::ER_SEEK:
                              $msg .= 'Seek error.';
                              break;
                      }
                  }
                  break;
  
              case self::INVALID_SOURCE:
                  $msg = 'Invalid source file';
                  break;
  
              default:
                  $msg = 'Unknown Error';
                  break;
          }
  
          return $msg;
      }
code_tokens: public static function lastErrorMsg ( ) { if ( is_string ( self :: $ error ) ) { return self :: $ error ; } switch ( self :: $ error ) { case 0 : $ msg = 'No Error' ; break ; case self :: EXISTS : $ msg = 'The target path "' . self :: $ target . '" already exists' ; break ; case self :: IS_LINK : $ msg = 'The target path "' . self :: $ target . '" is a symbolic link' ; break ; case self :: NOT_FOUND : $ msg = 'The target path "' . self :: $ target . '" does not appear to exist' ; break ; case self :: NOT_DIRECTORY : $ msg = 'The target path "' . self :: $ target . '" does not appear to be a folder' ; break ; case self :: NOT_GRAV_ROOT : $ msg = 'The target path "' . self :: $ target . '" does not appear to be a Grav instance' ; break ; case self :: ZIP_OPEN_ERROR : $ msg = 'Unable to open the package file' ; break ; case self :: ZIP_EXTRACT_ERROR : $ msg = 'Unable to extract the package. ' ; if ( self :: $ error_zip ) { switch ( self :: $ error_zip ) { case \ ZipArchive :: ER_EXISTS : $ msg .= 'File already exists.' ; break ; case \ ZipArchive :: ER_INCONS : $ msg .= 'Zip archive inconsistent.' ; break ; case \ ZipArchive :: ER_MEMORY : $ msg .= 'Memory allocation failure.' ; break ; case \ ZipArchive :: ER_NOENT : $ msg .= 'No such file.' ; break ; case \ ZipArchive :: ER_NOZIP : $ msg .= 'Not a zip archive.' ; break ; case \ ZipArchive :: ER_OPEN : $ msg .= "Can't open file." ; break ; case \ ZipArchive :: ER_READ : $ msg .= 'Read error.' ; break ; case \ ZipArchive :: ER_SEEK : $ msg .= 'Seek error.' ; break ; } } break ; case self :: INVALID_SOURCE : $ msg = 'Invalid source file' ; break ; default : $ msg = 'Unknown Error' ; break ; } return $ msg ; }
docstring: Returns the last error occurred in a string message format
  @return string The message of the last error
docstring_tokens: Returns the last error occurred in a string message format