protected function splitSegments(array $segments, string $deliminator): array
    {
        // The final segments to return
        $returnSegments = [];

        // Iterate through the segments once more
        foreach ($segments as $segment) {
            // If the segment has the deliminator
            if (strpos($segment, $deliminator) !== false) {
                $this->splitSegmentsDeliminator(
                    $returnSegments,
                    $segment,
                    $deliminator
                );

                continue;
            }

            // Otherwise set the segment normally
            $returnSegments[] = $segment;
        }

        return $returnSegments;
    }
protected function splitSegments(array $segments, string $deliminator): array
    {
        // The final segments to return
        $returnSegments = [];

        // Iterate through the segments once more
        foreach ($segments as $segment) {
            // If the segment has the deliminator
            if (strpos($segment, $deliminator) !== false) {
                $this->splitSegmentsDeliminator(
                    $returnSegments,
                    $segment,
                    $deliminator
                );

                continue;
            }

            // Otherwise set the segment normally
            $returnSegments[] = $segment;
        }

        return $returnSegments;
    }
protected function splitSegments ( array $ segments , string $ deliminator ) : array { // The final segments to return $ returnSegments = [ ] ; // Iterate through the segments once more foreach ( $ segments as $ segment ) { // If the segment has the deliminator if ( strpos ( $ segment , $ deliminator ) !== false ) { $ this -> splitSegmentsDeliminator ( $ returnSegments , $ segment , $ deliminator ) ; continue ; } // Otherwise set the segment normally $ returnSegments [ ] = $ segment ; } return $ returnSegments ; }
Split segments based on ending bracket within the segments.

@param array  $segments    The segments
@param string $deliminator The deliminator

@return array
Split segments based on ending bracket within the segments .