protected function combineSelectorSingle($base, $other)
    {
        $tag = [];
        $out = [];
        $wasTag = true;

        foreach ([$base, $other] as $single) {
            foreach ($single as $part) {
                if (preg_match('/^[\[.:#]/', $part)) {
                    $out[] = $part;
                    $wasTag = false;
                } elseif (preg_match('/^[^_-]/', $part)) {
                    $tag[] = $part;
                    $wasTag = true;
                } elseif ($wasTag) {
                    $tag[count($tag) - 1] .= $part;
                } else {
                    $out[count($out) - 1] .= $part;
                }
            }
        }

        if (count($tag)) {
            array_unshift($out, $tag[0]);
        }

        return $out;
    }
protected function combineSelectorSingle($base, $other)
    {
        $tag = [];
        $out = [];
        $wasTag = true;

        foreach ([$base, $other] as $single) {
            foreach ($single as $part) {
                if (preg_match('/^[\[.:#]/', $part)) {
                    $out[] = $part;
                    $wasTag = false;
                } elseif (preg_match('/^[^_-]/', $part)) {
                    $tag[] = $part;
                    $wasTag = true;
                } elseif ($wasTag) {
                    $tag[count($tag) - 1] .= $part;
                } else {
                    $out[count($out) - 1] .= $part;
                }
            }
        }

        if (count($tag)) {
            array_unshift($out, $tag[0]);
        }

        return $out;
    }
protected function combineSelectorSingle ( $ base , $ other ) { $ tag = [ ] ; $ out = [ ] ; $ wasTag = true ; foreach ( [ $ base , $ other ] as $ single ) { foreach ( $ single as $ part ) { if ( preg_match ( '/^[\[.:#]/' , $ part ) ) { $ out [ ] = $ part ; $ wasTag = false ; } elseif ( preg_match ( '/^[^_-]/' , $ part ) ) { $ tag [ ] = $ part ; $ wasTag = true ; } elseif ( $ wasTag ) { $ tag [ count ( $ tag ) - 1 ] .= $ part ; } else { $ out [ count ( $ out ) - 1 ] .= $ part ; } } } if ( count ( $ tag ) ) { array_unshift ( $ out , $ tag [ 0 ] ) ; } return $ out ; }
Combine selector single

@param array $base
@param array $other

@return array
Combine selector single