original_string: public function has_item_that_needs_access_check() {
          if (is_siteadmin()) {
              return null;
          }
          $this->retrieve_items();
          $counter = 0; // Counter for accessible items.
          foreach ($this->itemkeys as $id) {
              if (!array_key_exists($id, $this->accessibleitems)) {
                  return (object)(array)$this->items[$id];
              }
              $counter += $this->accessibleitems[$id] ? 1 : 0;
              if ($counter >= $this->from + $this->limit) {
                  // We found enough accessible items fot get_items() method, do not look any further.
                  return null;
              }
          }
          return null;
      }
code: public function has_item_that_needs_access_check() {
          if (is_siteadmin()) {
              return null;
          }
          $this->retrieve_items();
          $counter = 0; // Counter for accessible items.
          foreach ($this->itemkeys as $id) {
              if (!array_key_exists($id, $this->accessibleitems)) {
                  return (object)(array)$this->items[$id];
              }
              $counter += $this->accessibleitems[$id] ? 1 : 0;
              if ($counter >= $this->from + $this->limit) {
                  // We found enough accessible items fot get_items() method, do not look any further.
                  return null;
              }
          }
          return null;
      }
code_tokens: public function has_item_that_needs_access_check ( ) { if ( is_siteadmin ( ) ) { return null ; } $ this -> retrieve_items ( ) ; $ counter = 0 ; // Counter for accessible items. foreach ( $ this -> itemkeys as $ id ) { if ( ! array_key_exists ( $ id , $ this -> accessibleitems ) ) { return ( object ) ( array ) $ this -> items [ $ id ] ; } $ counter += $ this -> accessibleitems [ $ id ] ? 1 : 0 ; if ( $ counter >= $ this -> from + $ this -> limit ) { // We found enough accessible items fot get_items() method, do not look any further. return null ; } } return null ; }
docstring: Returns the first row from the SQL result that we don't know whether it is accessible by user or not.
  
  This will return null when we have necessary number of accessible items to return in {@link get_items()}
  
  After analyzing you may decide to mark not only this record but all similar as accessible or not accessible.
  For example, if you already call get_fast_modinfo() to check this item's accessibility, why not mark all
  items in the same course as accessible or not accessible.
  
  Helpful methods: {@link set_accessible()} and {@link walk()}
  
  @return null|object
docstring_tokens: Returns the first row from the SQL result that we don t know whether it is accessible by user or not .