Ejemplo n.º 1
0
 public function valid()
 {
     if ($this->streamed_count->equals($this->limit) && !$this->is_unlimited()) {
         return false;
     }
     return $this->event_snapshots->valid();
 }
Ejemplo n.º 2
0
 public function run()
 {
     while ($this->can_upgrade()) {
         $function = $this->get_function_name();
         if (!method_exists($this, $function)) {
             throw new \Exception('An upgrade handler could not be found.');
         }
         $this->{$function}($this->schema);
         $this->version = $this->version->increment();
     }
 }