From 4774577479d618932ba68c44c2e59ff1af050c9d Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Tue, 23 Mar 2021 09:35:26 +1300 Subject: [PATCH] Add @return phpdoc tags, remove unnecessary type definition var --- controller/WebController.php | 10 +++++----- model/BaseConfig.php | 4 +++- model/Concept.php | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/controller/WebController.php b/controller/WebController.php index afd972b56..fda5903d5 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -179,7 +179,6 @@ public function invokeVocabularyConcept(Request $request) return; } $pluginParameters = $vocab->getConfig()->getPluginParameters(); - /** @var \Twig\Template $template */ $template = (in_array('skos:Concept', $results[0]->getType()) || in_array('skos:ConceptScheme', $results[0]->getType())) ? $this->twig->loadTemplate('concept-info.twig') : $this->twig->loadTemplate('group-contents.twig'); $crumbs = $vocab->getBreadCrumbs($request->getContentLang(), $uri); @@ -588,10 +587,11 @@ public function getChangeList($request, $prop, $offset=0, $limit=200) } /** - * Formats the list of concepts as labels arranged by modification month - * @param Array $changeList - * @param string $lang the language for displaying dates in the change list - */ + * Formats the list of concepts as labels arranged by modification month + * @param Array $changeList + * @param string $lang the language for displaying dates in the change list + * @return array list of concepts as labels by month + */ public function formatChangeList($changeList, $lang) { $formatByDate = array(); diff --git a/model/BaseConfig.php b/model/BaseConfig.php index 2b9ce698b..befa2b8aa 100644 --- a/model/BaseConfig.php +++ b/model/BaseConfig.php @@ -11,6 +11,7 @@ abstract class BaseConfig extends DataObject * Returns a boolean value based on a literal value from the config.ttl configuration. * @param string $property the property to query * @param boolean $default the default value if the value is not set in configuration + * @return boolean the boolean value for the given property, or the default value if not found */ protected function getBoolean($property, $default = false) { @@ -37,10 +38,11 @@ protected function getResources($property) } /** - * Returns a boolean value based on a literal value from the config.ttl configuration. + * Returns a string value based on a literal value from the config.ttl configuration. * @param string $property the property to query * @param string $default default value * @param string $lang preferred language for the literal + * @return string string value for the given property, or the default value if not found */ protected function getLiteral($property, $default=null, $lang=null) { diff --git a/model/Concept.php b/model/Concept.php index 51e1f4e7b..67c48759b 100644 --- a/model/Concept.php +++ b/model/Concept.php @@ -907,6 +907,7 @@ public function getForeignLabels() /** * Gets the values for the property in question in all other languages than the ui language. * @param string $property + * @return array array of labels for the values of the given property */ public function getAllLabels($property) {