src/Component/Json.php
/**
     * Iterates a countable recursively and applies a function on each member of it.
     *
     * @param array $array
     * @param callable $function {@see self::forEachRecursive()}
     * @return self
     */
Iterates a countable recursively and applies a function on each member of it.
@param array $array
@param callable $function  self::forEachRecursive()
@return self
Iterates a countable recursively and applies a function on each member of it . @param array $array @param callable $function self :: forEachRecursive () @return self
protected function walkRecursive(array &$array, callable $function): self
    {
        foreach ($array as $key => &$value) {
            if (is_array($value)) {
                $this->walkRecursive($value, $function);
            } else {
                $function($value, $key);
            }
        }
        return $this;
    }
protected function walkRecursive ( array & $ array , callable $ function ) : self { foreach ( $ array as $ key => & $ value ) { if ( is_array ( $ value ) ) { $ this -> walkRecursive ( $ value , $ function ) ; } else { $ function ( $ value , $ key ) ; } } return $ this ; }
Iterates a countable recursively and applies a function on each member of it.
Iterates a countable recursively and applies a function on each member of it .
// Recursion