/** * Returns the length and width of the smallest side of a {@link Present} * @param Present $present * @return int[] [length, width] */ private static function smallestSide(Present $present) { $dimensions = [$present->getLength(), $present->getWidth(), $present->getHeight()]; sort($dimensions); return [$dimensions[0], $dimensions[1]]; }