Skip to content

Commit

Permalink
Add @return phpdoc tags, remove unnecessary type definition var
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Mar 22, 2021
1 parent 3202ddb commit 4774577
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions controller/WebController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion model/BaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions model/Concept.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 4774577

Please sign in to comment.