public function mergeContents($path, $content, $isReturnJson = false, $removeOptions = null, $isPhp = false)
    {
        if ($isPhp) {
            $fileContent = $this->getPhpContents($path);
        } else {
            $fileContent = $this->getContents($path);
        }

        $fullPath = $this->concatPaths($path);
        if (file_exists($fullPath) && ($fileContent === false || empty($fileContent))) {
            throw new Error('FileManager: Failed to read file [' . $fullPath .'].');
        }

        $savedDataArray = Utils\Json::getArrayData($fileContent);
        $newDataArray = Utils\Json::getArrayData($content);

        if (isset($removeOptions)) {
            $savedDataArray = Utils\Util::unsetInArray($savedDataArray, $removeOptions);
            $newDataArray = Utils\Util::unsetInArray($newDataArray, $removeOptions);
        }

        $data = Utils\Util::merge($savedDataArray, $newDataArray);

        if ($isReturnJson) {
            $data = Utils\Json::encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
        }

        if ($isPhp) {
            return $this->putPhpContents($path, $data);
        }

        return $this->putContents($path, $data);
    }