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;
    }