protected function checkTypeAllowed()
    {
        if (!in_array($this->type, static::$ALLOWED_TYPES)) {
            throw new \Exception(
                sprintf(
                    "`%s` is not a valid environment type. Expected one of: %s",
                    $this->type,
                    implode(', ', static::$ALLOWED_TYPES)
                )
            );
        }
    }
protected function checkTypeAllowed()
    {
        if (!in_array($this->type, static::$ALLOWED_TYPES)) {
            throw new \Exception(
                sprintf(
                    "`%s` is not a valid environment type. Expected one of: %s",
                    $this->type,
                    implode(', ', static::$ALLOWED_TYPES)
                )
            );
        }
    }
protected function checkTypeAllowed ( ) { if ( ! in_array ( $ this -> type , static :: $ ALLOWED_TYPES ) ) { throw new \ Exception ( sprintf ( "`%s` is not a valid environment type. Expected one of: %s" , $ this -> type , implode ( ', ' , static :: $ ALLOWED_TYPES ) ) ) ; } }
Makes sure the current type is allowed

@throws \Exception
Makes sure the current type is allowed