original_string: public function get_file_by_hash($pathnamehash) {
          global $DB;
  
          $sql = "SELECT ".self::instance_sql_fields('f', 'r')."
                    FROM {files} f
               LEFT JOIN {files_reference} r
                         ON f.referencefileid = r.id
                   WHERE f.pathnamehash = ?";
          if ($filerecord = $DB->get_record_sql($sql, array($pathnamehash))) {
              return $this->get_file_instance($filerecord);
          } else {
              return false;
          }
      }
code: public function get_file_by_hash($pathnamehash) {
          global $DB;
  
          $sql = "SELECT ".self::instance_sql_fields('f', 'r')."
                    FROM {files} f
               LEFT JOIN {files_reference} r
                         ON f.referencefileid = r.id
                   WHERE f.pathnamehash = ?";
          if ($filerecord = $DB->get_record_sql($sql, array($pathnamehash))) {
              return $this->get_file_instance($filerecord);
          } else {
              return false;
          }
      }
code_tokens: public function get_file_by_hash ( $ pathnamehash ) { global $ DB ; $ sql = "SELECT " . self :: instance_sql_fields ( 'f' , 'r' ) . "
                    FROM {files} f
               LEFT JOIN {files_reference} r
                         ON f.referencefileid = r.id
                   WHERE f.pathnamehash = ?" ; if ( $ filerecord = $ DB -> get_record_sql ( $ sql , array ( $ pathnamehash ) ) ) { return $ this -> get_file_instance ( $ filerecord ) ; } else { return false ; } }
docstring: Fetch file using local file full pathname hash
  
  @param string $pathnamehash path name hash
  @return stored_file|bool stored_file instance if exists, false if not
docstring_tokens: Fetch file using local file full pathname hash