public static function format($json, array $arrayKeys = array(), $indent = self::DEFAULT_INDENT, $formatJson = true)
    {
        if ($formatJson) {
            $json = ComposerJsonFormatter::format($json, true, true);
        }

        if (4 !== $indent) {
            $json = str_replace('    ', sprintf('%'.$indent.'s', ''), $json);
        }

        return self::replaceArrayByMap($json, $arrayKeys);
    }