diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-09-06 13:06:59 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-09-06 16:03:37 +0100 |
| commit | bb57cf020a15502710bb777953ca13b884312030 (patch) | |
| tree | 2551342e0099abba2d6ccca717e007b4d0f49612 | |
| parent | b108908174bafa493667672cfb8e9510f0750f22 (diff) | |
| download | webtrees-bb57cf020a15502710bb777953ca13b884312030.tar.gz webtrees-bb57cf020a15502710bb777953ca13b884312030.tar.bz2 webtrees-bb57cf020a15502710bb777953ca13b884312030.zip | |
Remove dead code
| -rw-r--r-- | app/Services/GedcomExportService.php | 26 | ||||
| -rw-r--r-- | phpstan-baseline.neon | 5 |
2 files changed, 0 insertions, 31 deletions
diff --git a/app/Services/GedcomExportService.php b/app/Services/GedcomExportService.php index f9125f85db..548d65a380 100644 --- a/app/Services/GedcomExportService.php +++ b/app/Services/GedcomExportService.php @@ -332,32 +332,6 @@ class GedcomExportService } /** - * Prepend a media path, such as might have been removed during import. - * - * @param string $gedcom - * @param string $media_path - * - * @return string - */ - private function convertMediaPath(string $gedcom, string $media_path): string - { - if (preg_match('/^0 @[^@]+@ OBJE/', $gedcom)) { - return preg_replace_callback('/\n1 FILE (.+)/', static function (array $match) use ($media_path): string { - $filename = $match[1]; - - // Don’t modify external links - if (!str_contains($filename, '://')) { - $filename = $media_path . $filename; - } - - return "\n1 FILE " . $filename; - }, $gedcom); - } - - return $gedcom; - } - - /** * Wrap long lines using concatenation records. * * @param string $gedcom diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f78cf64f24..9d3d64d3a8 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2546,11 +2546,6 @@ parameters: path: app/Services/GedcomEditService.php - - message: "#^Method Fisharebest\\\\Webtrees\\\\Services\\\\GedcomExportService\\:\\:convertMediaPath\\(\\) should return string but returns string\\|null\\.$#" - count: 1 - path: app/Services/GedcomExportService.php - - - message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#" count: 1 path: app/Services/GedcomExportService.php |
