original_string: public static function averageAmount($since = 0, $until = null)
      {
          $until = $until ?: time();
  
          return (int) self::where('created', '>=', $since)
              ->where('created', '<=', $until)
              ->avg('total');
      }
code: public static function averageAmount($since = 0, $until = null)
      {
          $until = $until ?: time();
  
          return (int) self::where('created', '>=', $since)
              ->where('created', '<=', $until)
              ->avg('total');
      }
code_tokens: public static function averageAmount ( $ since = 0 , $ until = null ) { $ until = $ until ? : time ( ) ; return ( int ) self :: where ( 'created' , '>=' , $ since ) -> where ( 'created' , '<=' , $ until ) -> avg ( 'total' ) ; }
docstring: Return the average amount of purchases.
  
  @param integer $since UNIX timestamp to optionally specify a lower selection boundary.
  @param integer $until UNIX timestamp to optionally specify an upper selection boundary.
  @return integer
docstring_tokens: Return the average amount of purchases .