original_string: protected function get_lastpage() {
          $pages = $this->load_all_pages();
          if (count($pages) > 0) {
              foreach ($pages as $page) {
                  if ((int)$page->nextpageid === 0) {
                      return $page;
                  }
              }
          }
          return false;
      }
code: protected function get_lastpage() {
          $pages = $this->load_all_pages();
          if (count($pages) > 0) {
              foreach ($pages as $page) {
                  if ((int)$page->nextpageid === 0) {
                      return $page;
                  }
              }
          }
          return false;
      }
code_tokens: protected function get_lastpage ( ) { $ pages = $ this -> load_all_pages ( ) ; if ( count ( $ pages ) > 0 ) { foreach ( $ pages as $ page ) { if ( ( int ) $ page -> nextpageid === 0 ) { return $ page ; } } } return false ; }
docstring: Returns the last page for the lesson or false if there isn't one.
  
  This method should be called via the magic method __get();
  <code>
  $lastpage = $lesson->lastpage;
  </code>
  
  @return lesson_page|bool Returns the lesson_page specialised object or false
docstring_tokens: Returns the last page for the lesson or false if there isn t one .