protected function targetUrlExists($url) { try { $urlParts = parse_url($url); $urlPath = $urlParts['path']; $path = null; if (StringUtils::startsWith($urlPath, '/')) { /* Absolute paths won't work */ return false; } else { $directoryPath = $this->path->getParentPath(); $path = $directoryPath->appendPathString($urlPath); } $fileExists = $this->repository->exists($path); $this->linkedPaths[] = $path; return $fileExists; } catch (\Exception $e) { } return true; }
/** * @param FilePath $relativeLockPath * * @return int */ protected function getLockExpiry(FilePath $relativeLockPath) { $mTime = $this->gitRepository->getModificationTime($relativeLockPath); return $mTime + 60; }