src/NodeFactory.php
protected static function flatten(array $arguments) : array
    {
        $result = [];
        foreach($arguments as $argument) {
            if(is_array($argument)) {
                $result = array_merge($result, $argument);
            } elseif($argument !== null) {
                $result[] = $argument;
            }
        }
        return $result;
    }
protected static function flatten(array $arguments) : array
    {
        $result = [];
        foreach($arguments as $argument) {
            if(is_array($argument)) {
                $result = array_merge($result, $argument);
            } elseif($argument !== null) {
                $result[] = $argument;
            }
        }
        return $result;
    }
protected static function flatten ( array $ arguments ) : array { $ result = [ ] ; foreach ( $ arguments as $ argument ) { if ( is_array ( $ argument ) ) { $ result = array_merge ( $ result , $ argument ) ; } elseif ( $ argument !== null ) { $ result [ ] = $ argument ; } } return $ result ; }
An api consumer can pass arrays coming from function calls as children to the method "create". Elements in this
array are direct children of the node created with the method "create". Those must therefore be flattened.
@param array $arguments
@return array
An api consumer can pass arrays coming from function calls as children to the method create . Elements in this array are direct children of the node created with the method create . Those must therefore be flattened .