<commit_before><?

namespace iFixit\TokenBucket;

use \InvalidArgumentException;

class StoredBucket {
   private $tokens;
   private $lastConsume;

   /**
    * @param $lastConsume number of seconds since the last consumption.
    */
   public function __construct($tokens, $lastConsume) {
      if (!is_double($lastConsume)) {
         throw new InvalidArgumentException("lastConsume should be an int");
      }
      if (!is_int($tokens)) {
         throw new InvalidArgumentException("tokens should be an int");
      }

      $this->tokens = $tokens;
      $this->lastConsume = $lastConsume;
   }

   public function getTokens() {
      return $this->tokens;
   }
<commit_msg>Accept either double or int for StoredBucket<commit_after><?

namespace iFixit\TokenBucket;

use \InvalidArgumentException;

class StoredBucket {
   private $tokens;
   private $lastConsume;

   /**
    * @param $lastConsume number of seconds since the last consumption.
    */
   public function __construct($tokens, $lastConsume) {
      if (!is_numeric($lastConsume)) {
         throw new InvalidArgumentException("lastConsume should be an int");
      }
      if (!is_int($tokens)) {
         throw new InvalidArgumentException("tokens should be an int");
      }

      $this->tokens = $tokens;
      $this->lastConsume = $lastConsume;
   }

   public function getTokens() {
      return $this->tokens;
   }

{'fraction_non_alphanumeric': 0.10903873744619799, 'fraction_numerical': 0.0, 'mean_word_length': 3.067055393586006, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '457972', 'n_tokens_mistral': 399, 'n_tokens_neox': 390, 'n_words': 108}