original_string: public static function cleanupExpiredSubscription( $time )
      {
          //1. find the subscription which is disabled and whose time is too long
          $startTime = time() - $time;
          $db = eZDB::instance();
          $selectSql = "SELECT id FROM ezcomment_subscription WHERE subscription_time < $startTime AND enabled = 0";
          $result = $db->arrayQuery( $selectSql );
          if ( is_array( $result ) && count( $result ) > 0 )
          {
              //2. clean up the subscription
              $deleteSql = "DELETE FROM ezcomment_subscription WHERE subscription_time < $startTime AND enabled = 0";
              $db->query( $deleteSql );
              return $result;
          }
          else
          {
              return null;
          }
      }
code: public static function cleanupExpiredSubscription( $time )
      {
          //1. find the subscription which is disabled and whose time is too long
          $startTime = time() - $time;
          $db = eZDB::instance();
          $selectSql = "SELECT id FROM ezcomment_subscription WHERE subscription_time < $startTime AND enabled = 0";
          $result = $db->arrayQuery( $selectSql );
          if ( is_array( $result ) && count( $result ) > 0 )
          {
              //2. clean up the subscription
              $deleteSql = "DELETE FROM ezcomment_subscription WHERE subscription_time < $startTime AND enabled = 0";
              $db->query( $deleteSql );
              return $result;
          }
          else
          {
              return null;
          }
      }
code_tokens: public static function cleanupExpiredSubscription ( $ time ) { //1. find the subscription which is disabled and whose time is too long $ startTime = time ( ) - $ time ; $ db = eZDB :: instance ( ) ; $ selectSql = "SELECT id FROM ezcomment_subscription WHERE subscription_time < $startTime AND enabled = 0" ; $ result = $ db -> arrayQuery ( $ selectSql ) ; if ( is_array ( $ result ) && count ( $ result ) > 0 ) { //2. clean up the subscription $ deleteSql = "DELETE FROM ezcomment_subscription WHERE subscription_time < $startTime AND enabled = 0" ; $ db -> query ( $ deleteSql ) ; return $ result ; } else { return null ; } }
docstring: clean up the subscription if the subscription has not been activate for very long
  @return array id of subscription cleaned up
  null if nothing cleaned up
docstring_tokens: clean up the subscription if the subscription has not been activate for very long