public function buildArray(array $inputs)
    {
        $newArray = [];

        foreach ($inputs as $path => $value) {
            if (is_array($value)) {
                throw new InvalidArgumentException('Input array CANNOT contain nested arrays.');
            }

            if (isset($path[0])) {
                if ($path[0] === '_' || $path[0] === '.') {
                    unset($inputs[$path]);
                    continue;
                }
            }

            $this->assignArrayByDotPath($newArray, $path, $value);
        }

        return $newArray;
    }
public function buildArray(array $inputs)
    {
        $newArray = [];

        foreach ($inputs as $path => $value) {
            if (is_array($value)) {
                throw new InvalidArgumentException('Input array CANNOT contain nested arrays.');
            }

            if (isset($path[0])) {
                if ($path[0] === '_' || $path[0] === '.') {
                    unset($inputs[$path]);
                    continue;
                }
            }

            $this->assignArrayByDotPath($newArray, $path, $value);
        }

        return $newArray;
    }
public function buildArray ( array $ inputs ) { $ newArray = [ ] ; foreach ( $ inputs as $ path => $ value ) { if ( is_array ( $ value ) ) { throw new InvalidArgumentException ( 'Input array CANNOT contain nested arrays.' ) ; } if ( isset ( $ path [ 0 ] ) ) { if ( $ path [ 0 ] === '_' || $ path [ 0 ] === '.' ) { unset ( $ inputs [ $ path ] ) ; continue ; } } $ this -> assignArrayByDotPath ( $ newArray , $ path , $ value ) ; } return $ newArray ; }
Build the final array that will be written into the file. Support dot notation.

@param  array $inputs

@throws InvalidArgumentException
@throws TooManyNestedArraysException

@return array
Build the final array that will be written into the file . Support dot notation .