private function checkStage($stage)
    {
        if ($this->runtime->getStage() !== $stage) {
            throw new RuntimeException(sprintf('Invalid stage, got "%s" but expected "%"', $this->runtime->getStage(), $stage));
        }
    }
private function checkStage($stage)
    {
        if ($this->runtime->getStage() !== $stage) {
            throw new RuntimeException(sprintf('Invalid stage, got "%s" but expected "%"', $this->runtime->getStage(), $stage));
        }
    }
private function checkStage ( $ stage ) { if ( $ this -> runtime -> getStage ( ) !== $ stage ) { throw new RuntimeException ( sprintf ( 'Invalid stage, got "%s" but expected "%"' , $ this -> runtime -> getStage ( ) , $ stage ) ) ; } }
Check the runtime stage is correct

@param $stage
@throws RuntimeException
Check the runtime stage is correct