original_string: public function compare(\DateInterval $first, \DateInterval $second)
      {
          if ($this->safe) {
              $this->safecheck($first);
              $this->safecheck($second);
          }
  
          if ($first->y > $second->y) {
              return 1;
          }
  
          if ($first->y < $second->y) {
              return -1;
          }
  
          if ($first->m > $second->m) {
              return 1;
          }
  
          if ($first->m < $second->m) {
              return -1;
          }
  
          if ($first->d > $second->d) {
              return 1;
          }
  
          if ($first->d < $second->d) {
              return -1;
          }
  
          if ($first->h > $second->h) {
              return 1;
          }
  
          if ($first->h < $second->h) {
              return -1;
          }
  
          if ($first->i > $second->i) {
              return 1;
          }
  
          if ($first->i < $second->i) {
              return -1;
          }
  
          if ($first->s > $second->s) {
              return 1;
          }
  
          if ($first->s < $second->s) {
              return -1;
          }
  
          return 0;
      }
code: public function compare(\DateInterval $first, \DateInterval $second)
      {
          if ($this->safe) {
              $this->safecheck($first);
              $this->safecheck($second);
          }
  
          if ($first->y > $second->y) {
              return 1;
          }
  
          if ($first->y < $second->y) {
              return -1;
          }
  
          if ($first->m > $second->m) {
              return 1;
          }
  
          if ($first->m < $second->m) {
              return -1;
          }
  
          if ($first->d > $second->d) {
              return 1;
          }
  
          if ($first->d < $second->d) {
              return -1;
          }
  
          if ($first->h > $second->h) {
              return 1;
          }
  
          if ($first->h < $second->h) {
              return -1;
          }
  
          if ($first->i > $second->i) {
              return 1;
          }
  
          if ($first->i < $second->i) {
              return -1;
          }
  
          if ($first->s > $second->s) {
              return 1;
          }
  
          if ($first->s < $second->s) {
              return -1;
          }
  
          return 0;
      }
code_tokens: public function compare ( \ DateInterval $ first , \ DateInterval $ second ) { if ( $ this -> safe ) { $ this -> safecheck ( $ first ) ; $ this -> safecheck ( $ second ) ; } if ( $ first -> y > $ second -> y ) { return 1 ; } if ( $ first -> y < $ second -> y ) { return - 1 ; } if ( $ first -> m > $ second -> m ) { return 1 ; } if ( $ first -> m < $ second -> m ) { return - 1 ; } if ( $ first -> d > $ second -> d ) { return 1 ; } if ( $ first -> d < $ second -> d ) { return - 1 ; } if ( $ first -> h > $ second -> h ) { return 1 ; } if ( $ first -> h < $ second -> h ) { return - 1 ; } if ( $ first -> i > $ second -> i ) { return 1 ; } if ( $ first -> i < $ second -> i ) { return - 1 ; } if ( $ first -> s > $ second -> s ) { return 1 ; } if ( $ first -> s < $ second -> s ) { return - 1 ; } return 0 ; }
docstring: COmpare the two date intervals.
  
  If the first contains a larger timespan we return 1, if the second contains more
  we return -1 and when they are equals we return 0.
  
  @param \DateInterval $first
  @param \DateInterval $second
  
  @return int
docstring_tokens: COmpare the two date intervals .