public function quartile(int $index): Quartile
    {
        switch ($index) {
            case 0:
                return $this->min;
            case 1:
                return $this->firstQuartile;
            case 2:
                return $this->median;
            case 3:
                return $this->thirdQuartile;
            case 4:
                return $this->max;
        }

        throw new OutOfRangeException;
    }
public function quartile(int $index): Quartile
    {
        switch ($index) {
            case 0:
                return $this->min;
            case 1:
                return $this->firstQuartile;
            case 2:
                return $this->median;
            case 3:
                return $this->thirdQuartile;
            case 4:
                return $this->max;
        }

        throw new OutOfRangeException;
    }
public function quartile ( int $ index ) : Quartile { switch ( $ index ) { case 0 : return $ this -> min ; case 1 : return $ this -> firstQuartile ; case 2 : return $ this -> median ; case 3 : return $ this -> thirdQuartile ; case 4 : return $ this -> max ; } throw new OutOfRangeException ; }
Return the quartile at the wished index

@param int $index

@return Quartile
Return the quartile at the wished index