original_string: protected function make_file_record(array $fileinfo) {
  
          $defaultrecord = array(
              'contenthash'   => file_storage::hash_from_string(''),
              'contextid'     => $this->contextid,
              'component'     => $this->component,
              'filearea'      => $this->filearea,
              'itemid'        => $this->itemid,
              'filepath'      => null,
              'filename'      => null,
              'filesize'      => 0,
              'userid'        => $this->userid,
              'mimetype'      => null,
              'status'        => 0,
              'timecreated'   => $now = time(),
              'timemodified'  => $now,
              'source'        => null,
              'author'        => null,
              'license'       => null,
              'sortorder'     => 0,
          );
  
          if (!array_key_exists('id', $fileinfo)) {
              $defaultrecord['id'] = $this->converter->get_nextid();
          }
  
          // override the default values with the explicit data provided and return
          return array_merge($defaultrecord, $fileinfo);
      }
code: protected function make_file_record(array $fileinfo) {
  
          $defaultrecord = array(
              'contenthash'   => file_storage::hash_from_string(''),
              'contextid'     => $this->contextid,
              'component'     => $this->component,
              'filearea'      => $this->filearea,
              'itemid'        => $this->itemid,
              'filepath'      => null,
              'filename'      => null,
              'filesize'      => 0,
              'userid'        => $this->userid,
              'mimetype'      => null,
              'status'        => 0,
              'timecreated'   => $now = time(),
              'timemodified'  => $now,
              'source'        => null,
              'author'        => null,
              'license'       => null,
              'sortorder'     => 0,
          );
  
          if (!array_key_exists('id', $fileinfo)) {
              $defaultrecord['id'] = $this->converter->get_nextid();
          }
  
          // override the default values with the explicit data provided and return
          return array_merge($defaultrecord, $fileinfo);
      }
code_tokens: protected function make_file_record ( array $ fileinfo ) { $ defaultrecord = array ( 'contenthash' => file_storage :: hash_from_string ( '' ) , 'contextid' => $ this -> contextid , 'component' => $ this -> component , 'filearea' => $ this -> filearea , 'itemid' => $ this -> itemid , 'filepath' => null , 'filename' => null , 'filesize' => 0 , 'userid' => $ this -> userid , 'mimetype' => null , 'status' => 0 , 'timecreated' => $ now = time ( ) , 'timemodified' => $ now , 'source' => null , 'author' => null , 'license' => null , 'sortorder' => 0 , ) ; if ( ! array_key_exists ( 'id' , $ fileinfo ) ) { $ defaultrecord [ 'id' ] = $ this -> converter -> get_nextid ( ) ; } // override the default values with the explicit data provided and return return array_merge ( $ defaultrecord , $ fileinfo ) ; }
docstring: Prepares a fake record from the files table
  
  @param array $fileinfo explicit file data
  @return array
docstring_tokens: Prepares a fake record from the files table