private function traverse(array $registry): array
    {
        foreach ($registry as &$value) {
            switch (true) {
                case is_array($value):
                    $value = $this->traverse($value);
                    break;

                case is_string($value):
                    $value = $this->replace($value);
                    break;
            }
        }

        return $registry;
    }
private function traverse(array $registry): array
    {
        foreach ($registry as &$value) {
            switch (true) {
                case is_array($value):
                    $value = $this->traverse($value);
                    break;

                case is_string($value):
                    $value = $this->replace($value);
                    break;
            }
        }

        return $registry;
    }
private function traverse ( array $ registry ) : array { foreach ( $ registry as & $ value ) { switch ( true ) { case is_array ( $ value ) : $ value = $ this -> traverse ( $ value ) ; break ; case is_string ( $ value ) : $ value = $ this -> replace ( $ value ) ; break ; } } return $ registry ; }
Traverse through registry tree

@param array $registry
@return array
Traverse through registry tree