public static function flatten(array $subjectArray, $depth = INF)
    {
        $flattenArray = [];

        foreach ($subjectArray as $value) {
            if (!is_array($value)) {
                $flattenArray[] = $value;
            } elseif ($depth === 1) {
                $flattenArray = array_merge($flattenArray, array_values($value));
            } else {
                $flattenArray = array_merge($flattenArray, static::flatten($value, $depth - 1));
            }
        }

        return $flattenArray;
    }