original_string: protected function getSeconds($ttl)
      {
          $duration = $this->parseDateInterval($ttl);
  
          if ($duration instanceof DateTimeInterface) {
              $duration = Carbon::now()->diffInRealSeconds($duration, false);
          }
  
          return (int) $duration > 0 ? $duration : 0;
      }
code: protected function getSeconds($ttl)
      {
          $duration = $this->parseDateInterval($ttl);
  
          if ($duration instanceof DateTimeInterface) {
              $duration = Carbon::now()->diffInRealSeconds($duration, false);
          }
  
          return (int) $duration > 0 ? $duration : 0;
      }
code_tokens: protected function getSeconds ( $ ttl ) { $ duration = $ this -> parseDateInterval ( $ ttl ) ; if ( $ duration instanceof DateTimeInterface ) { $ duration = Carbon :: now ( ) -> diffInRealSeconds ( $ duration , false ) ; } return ( int ) $ duration > 0 ? $ duration : 0 ; }
docstring: Calculate the number of seconds for the given TTL.
  
  @param  \DateTimeInterface|\DateInterval|int  $ttl
  @return int
docstring_tokens: Calculate the number of seconds for the given TTL .