From d370805b1f8cebae5f9e980af57b7f4e90fb84e6 Mon Sep 17 00:00:00 2001 From: Thibaud Fabre Date: Sat, 2 Jul 2016 15:03:25 +0200 Subject: [PATCH] Rename methods for more consistency --- lib/Alchemy/Phrasea/Search/StoryTransformer.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Search/StoryTransformer.php b/lib/Alchemy/Phrasea/Search/StoryTransformer.php index 79f8aae9a7..34a741e271 100644 --- a/lib/Alchemy/Phrasea/Search/StoryTransformer.php +++ b/lib/Alchemy/Phrasea/Search/StoryTransformer.php @@ -69,7 +69,7 @@ class StoryTransformer extends TransformerAbstract public function includeMetadatas(StoryView $storyView) { - return $this->item($storyView->getCaption(), $this->getCaptionTransformer()); + return $this->item($storyView->getCaption(), $this->getCaptionDCFieldTransformer()); } public function includeRecords(StoryView $storyView) @@ -79,10 +79,13 @@ class StoryTransformer extends TransformerAbstract public function includeCaption(StoryView $storyView) { - return $this->collection($storyView->getCaption()->getFields(), $this->getCaptionRecordTransformer()); + return $this->collection($storyView->getCaption()->getFields(), $this->getCaptionFieldTransformer()); } - private function getCaptionRecordTransformer() + /** + * @return \Closure + */ + private function getCaptionFieldTransformer() { return function (\caption_field $captionField) { return [ @@ -96,7 +99,7 @@ class StoryTransformer extends TransformerAbstract /** * @return \Closure */ - private function getCaptionTransformer() + private function getCaptionDCFieldTransformer() { /** * @param \caption_field[] $fields