original_string: public function getChangelog($diff = null)
      {
          if (!$diff) {
              return $this->data['changelog'];
          }
  
          $diffLog = [];
          foreach ((array)$this->data['changelog'] as $version => $changelog) {
              preg_match("/[\w\-\.]+/", $version, $cleanVersion);
  
              if (!$cleanVersion || version_compare($diff, $cleanVersion[0], '>=')) {
                  continue;
              }
  
              $diffLog[$version] = $changelog;
          }
  
          return $diffLog;
      }
code: public function getChangelog($diff = null)
      {
          if (!$diff) {
              return $this->data['changelog'];
          }
  
          $diffLog = [];
          foreach ((array)$this->data['changelog'] as $version => $changelog) {
              preg_match("/[\w\-\.]+/", $version, $cleanVersion);
  
              if (!$cleanVersion || version_compare($diff, $cleanVersion[0], '>=')) {
                  continue;
              }
  
              $diffLog[$version] = $changelog;
          }
  
          return $diffLog;
      }
code_tokens: public function getChangelog ( $ diff = null ) { if ( ! $ diff ) { return $ this -> data [ 'changelog' ] ; } $ diffLog = [ ] ; foreach ( ( array ) $ this -> data [ 'changelog' ] as $ version => $ changelog ) { preg_match ( "/[\w\-\.]+/" , $ version , $ cleanVersion ) ; if ( ! $ cleanVersion || version_compare ( $ diff , $ cleanVersion [ 0 ] , '>=' ) ) { continue ; } $ diffLog [ $ version ] = $ changelog ; } return $ diffLog ; }
docstring: Returns the changelog list for each version of Grav
  
  @param string $diff the version number to start the diff from
  
  @return array changelog list for each version
docstring_tokens: Returns the changelog list for each version of Grav