From 154a36700c80191121afec00b026daba5ff97dc8 Mon Sep 17 00:00:00 2001 From: maTh <1645099+math-GH@users.noreply.github.com> Date: Thu, 25 Apr 2024 08:28:42 +0200 Subject: Refactoring: Rename dotpath into dotnotation (#6369) * KIND_JSON_DOTPATH -> KIND_JSON_DOTNOTATION * TYPE_JSON_DOTPATH => TYPE_JSON_DOTNOTATION * json_dotpath => json_dotnotation * dotPathsForStandardJsonFeed => dotNotationForStandardJsonFeed * TYPE_JSON_DOTNOTATION = 'JSON+DotPath' => 'JSON+DotNotation' * documentation: OPML.md * convertJsonToRss() * $dotpaths => $dotnotations * FreshRSS_Feed_Exception * comment * Compatibility TYPE_JSON_DOTPATH --------- Co-authored-by: Alexandre Alapetite --- app/Models/Feed.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index ac2b2554f..efee3840f 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -31,7 +31,7 @@ class FreshRSS_Feed extends Minz_Model { public const KIND_JSON_XPATH = 20; public const KIND_JSONFEED = 25; - public const KIND_JSON_DOTPATH = 30; + public const KIND_JSON_DOTNOTATION = 30; public const PRIORITY_IMPORTANT = 20; public const PRIORITY_MAIN_STREAM = 10; @@ -621,7 +621,7 @@ class FreshRSS_Feed extends Minz_Model { } /** @return array */ - private function dotPathsForStandardJsonFeed(): array { + private function dotNotationForStandardJsonFeed(): array { return [ 'feedTitle' => 'title', 'item' => 'items', @@ -662,11 +662,11 @@ class FreshRSS_Feed extends Minz_Model { return null; } - /** @var array $json_dotpath */ - $json_dotpath = $this->attributeArray('json_dotpath') ?? []; - $dotPaths = $this->kind() === FreshRSS_Feed::KIND_JSONFEED ? $this->dotPathsForStandardJsonFeed() : $json_dotpath; + /** @var array $json_dotnotation */ + $json_dotnotation = $this->attributeArray('json_dotnotation') ?? []; + $dotnotations = $this->kind() === FreshRSS_Feed::KIND_JSONFEED ? $this->dotNotationForStandardJsonFeed() : $json_dotnotation; - $feedContent = FreshRSS_dotNotation_Util::convertJsonToRss($jf, $feedSourceUrl, $dotPaths, $this->name()); + $feedContent = FreshRSS_dotNotation_Util::convertJsonToRss($jf, $feedSourceUrl, $dotnotations, $this->name()); if ($feedContent == null) { return null; } -- cgit v1.2.3