original_string: public function get_image_size_in_draft_area($draftitemid) {
          global $USER;
          $usercontext = context_user::instance($USER->id);
          $fs = get_file_storage();
          $draftfiles = $fs->get_area_files($usercontext->id, 'user', 'draft', $draftitemid, 'id');
          if ($draftfiles) {
              foreach ($draftfiles as $file) {
                  if ($file->is_directory()) {
                      continue;
                  }
                  // Just return the data for the first good file, there should only be one.
                  $imageinfo = $file->get_imageinfo();
                  $width    = $imageinfo['width'];
                  $height   = $imageinfo['height'];
                  return array($width, $height);
              }
          }
          return null;
      }
code: public function get_image_size_in_draft_area($draftitemid) {
          global $USER;
          $usercontext = context_user::instance($USER->id);
          $fs = get_file_storage();
          $draftfiles = $fs->get_area_files($usercontext->id, 'user', 'draft', $draftitemid, 'id');
          if ($draftfiles) {
              foreach ($draftfiles as $file) {
                  if ($file->is_directory()) {
                      continue;
                  }
                  // Just return the data for the first good file, there should only be one.
                  $imageinfo = $file->get_imageinfo();
                  $width    = $imageinfo['width'];
                  $height   = $imageinfo['height'];
                  return array($width, $height);
              }
          }
          return null;
      }
code_tokens: public function get_image_size_in_draft_area ( $ draftitemid ) { global $ USER ; $ usercontext = context_user :: instance ( $ USER -> id ) ; $ fs = get_file_storage ( ) ; $ draftfiles = $ fs -> get_area_files ( $ usercontext -> id , 'user' , 'draft' , $ draftitemid , 'id' ) ; if ( $ draftfiles ) { foreach ( $ draftfiles as $ file ) { if ( $ file -> is_directory ( ) ) { continue ; } // Just return the data for the first good file, there should only be one. $ imageinfo = $ file -> get_imageinfo ( ) ; $ width = $ imageinfo [ 'width' ] ; $ height = $ imageinfo [ 'height' ] ; return array ( $ width , $ height ) ; } } return null ; }
docstring: Gets the width and height of a draft image.
  
  @param int $draftitemid ID of the draft image
  @return array Return array of the width and height of the draft image.
docstring_tokens: Gets the width and height of a draft image .