public function onRunStarted(RunEvent $event)
    {
        $index = array_search($event->getRun(), $this->waiting, true);
        if ($index !== false) {
            unset($this->waiting[$index]);
        }
        $this->running[] = $event->getRun();
        if ($this->state == static::STATE_NOT_STARTED) {
            $this->setStarted();
            $this->dispatch(RunEvent::STARTED, new RunEvent($this));
        }
        $this->dispatch(RunEvent::UPDATED, new RunEvent($this));
    }
public function onRunStarted(RunEvent $event)
    {
        $index = array_search($event->getRun(), $this->waiting, true);
        if ($index !== false) {
            unset($this->waiting[$index]);
        }
        $this->running[] = $event->getRun();
        if ($this->state == static::STATE_NOT_STARTED) {
            $this->setStarted();
            $this->dispatch(RunEvent::STARTED, new RunEvent($this));
        }
        $this->dispatch(RunEvent::UPDATED, new RunEvent($this));
    }
public function onRunStarted ( RunEvent $ event ) { $ index = array_search ( $ event -> getRun ( ) , $ this -> waiting , true ) ; if ( $ index !== false ) { unset ( $ this -> waiting [ $ index ] ) ; } $ this -> running [ ] = $ event -> getRun ( ) ; if ( $ this -> state == static :: STATE_NOT_STARTED ) { $ this -> setStarted ( ) ; $ this -> dispatch ( RunEvent :: STARTED , new RunEvent ( $ this ) ) ; } $ this -> dispatch ( RunEvent :: UPDATED , new RunEvent ( $ this ) ) ; }
When a run starts, check our current state and start ourselves in required

@param RunEvent $event
When a run starts check our current state and start ourselves in required