@@ -10,6 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | class VocabularyCategory extends DataObject |
12 | 12 | { |
13 | + /** |
|
14 | + * @param Model $model |
|
15 | + */ |
|
13 | 16 | public function __construct($model, $resource) |
14 | 17 | { |
15 | 18 | if (!($model instanceof Model)) { |
@@ -23,6 +23,9 @@ |
||
23 | 23 | } |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $name |
|
28 | + */ |
|
26 | 29 | private function getConstant($name, $default) |
27 | 30 | { |
28 | 31 | if (defined($name) && constant($name)) { |
@@ -114,7 +114,7 @@ |
||
114 | 114 | */ |
115 | 115 | public function getEnvLang() |
116 | 116 | { |
117 | - // get language from locale, same as used by gettext, set by Controller |
|
118 | - return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
117 | + // get language from locale, same as used by gettext, set by Controller |
|
118 | + return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
119 | 119 | } |
120 | 120 | } |
@@ -39,11 +39,11 @@ |
||
39 | 39 | return $html; |
40 | 40 | } |
41 | 41 | /** |
42 | - * Validate honeypot is empty |
|
43 | - * |
|
44 | - * @param mixed $value |
|
45 | - * @return boolean |
|
46 | - */ |
|
42 | + * Validate honeypot is empty |
|
43 | + * |
|
44 | + * @param mixed $value |
|
45 | + * @return boolean |
|
46 | + */ |
|
47 | 47 | public function validateHoneypot($value) |
48 | 48 | { |
49 | 49 | if ($this->disabled) { |
@@ -55,6 +55,7 @@ |
||
55 | 55 | |
56 | 56 | /** |
57 | 57 | * Steps back, restoring the previous character or statement read() to the input buffer. |
58 | + * @param string $chars |
|
58 | 59 | */ |
59 | 60 | protected function unread($chars) |
60 | 61 | { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | * Returns information (as a graph) for one or more concept URIs |
454 | 454 | * @param mixed $uris concept URI (string) or array of URIs |
455 | 455 | * @param string|null $arrayClass the URI for thesaurus array class, or null if not used |
456 | - * @param \Vocabulary[]|null $vocabs vocabularies to target |
|
456 | + * @param Vocabulary[] $vocabs vocabularies to target |
|
457 | 457 | * @return \Concept[] |
458 | 458 | */ |
459 | 459 | public function queryConceptInfoGraph($uris, $arrayClass = null, $vocabs = array()) { |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | |
674 | 674 | /** |
675 | 675 | * Generate a VALUES clause for limiting the targeted graphs. |
676 | - * @param Vocabulary[]|null $vocabs array of Vocabulary objects to target |
|
676 | + * @param Vocabulary[] $vocabs array of Vocabulary objects to target |
|
677 | 677 | * @return string VALUES clause, or "" if not necessary to limit |
678 | 678 | */ |
679 | 679 | protected function formatValuesGraph($vocabs) { |
@@ -853,6 +853,7 @@ discard block |
||
853 | 853 | * @param string $searchLang language code used for matching labels (null means any language) |
854 | 854 | * @param string[] $props properties to target e.g. array('skos:prefLabel','skos:altLabel') |
855 | 855 | * @param boolean $unique restrict results to unique concepts (default: false) |
856 | + * @param string $filterGraph |
|
856 | 857 | * @return string sparql query |
857 | 858 | */ |
858 | 859 | protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $props, $unique, $filterGraph) |
@@ -1118,6 +1119,7 @@ discard block |
||
1118 | 1119 | /** |
1119 | 1120 | * Generates sparql query clauses used for creating the alphabetical index. |
1120 | 1121 | * @param string $letter the letter (or special class) to search for |
1122 | + * @param string $lang |
|
1121 | 1123 | * @return array of sparql query clause strings |
1122 | 1124 | */ |
1123 | 1125 | private function formatFilterConditions($letter, $lang) { |
@@ -1744,7 +1744,7 @@ discard block |
||
1744 | 1744 | |
1745 | 1745 | /** |
1746 | 1746 | * Generates a sparql query for finding the hierarchy for a concept. |
1747 | - * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
1747 | + * A concept may be a top concept in multiple schemes, returned as a single whitespace-separated literal. |
|
1748 | 1748 | * @param string $uri concept uri. |
1749 | 1749 | * @param string $lang |
1750 | 1750 | * @param string $fallback language to use if label is not available in the preferred language |
@@ -1821,11 +1821,11 @@ discard block |
||
1821 | 1821 | $ret[$uri]['exact'] = $row->exact->getUri(); |
1822 | 1822 | } |
1823 | 1823 | if (isset($row->tops)) { |
1824 | - $topConceptsList=array(); |
|
1825 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
1826 | - // sort to garantee an alphabetical ordering of the URI |
|
1827 | - sort($topConceptsList); |
|
1828 | - $ret[$uri]['tops'] = $topConceptsList; |
|
1824 | + $topConceptsList=array(); |
|
1825 | + $topConceptsList=explode(" ", $row->tops->getValue()); |
|
1826 | + // sort to garantee an alphabetical ordering of the URI |
|
1827 | + sort($topConceptsList); |
|
1828 | + $ret[$uri]['tops'] = $topConceptsList; |
|
1829 | 1829 | } |
1830 | 1830 | if (isset($row->children)) { |
1831 | 1831 | if (!isset($ret[$uri]['narrower'])) { |
@@ -50,6 +50,7 @@ discard block |
||
50 | 50 | * @param Vocabulary $vocab |
51 | 51 | * @param EasyRdf\Resource $resource |
52 | 52 | * @param EasyRdf\Graph $graph |
53 | + * @param string|null $clang |
|
53 | 54 | */ |
54 | 55 | public function __construct($model, $vocab, $resource, $graph, $clang) |
55 | 56 | { |
@@ -526,6 +527,7 @@ discard block |
||
526 | 527 | |
527 | 528 | /** |
528 | 529 | * Gets the groups/arrays the concept belongs to. |
530 | + * @param boolean $includeArrays |
|
529 | 531 | */ |
530 | 532 | public function getReverseResources($includeArrays) { |
531 | 533 | $groups = array(); |
@@ -12,6 +12,9 @@ discard block |
||
12 | 12 | /** content language */ |
13 | 13 | private $clang; |
14 | 14 | |
15 | + /** |
|
16 | + * @param Model $model |
|
17 | + */ |
|
15 | 18 | public function __construct($model, $vocab, $resource, $prop, $clang = '') |
16 | 19 | { |
17 | 20 | parent::__construct($model, $vocab, $resource); |
@@ -76,6 +79,9 @@ discard block |
||
76 | 79 | return $this->vocab->getTitle(); |
77 | 80 | } |
78 | 81 | |
82 | + /** |
|
83 | + * @param ConceptPropertyValue $member |
|
84 | + */ |
|
79 | 85 | public function addSubMember($member, $lang = '') |
80 | 86 | { |
81 | 87 | $label = $member->getLabel($lang) ? $member->getLabel($lang) : $member->getLabel(); |
@@ -10,6 +10,9 @@ |
||
10 | 10 | /** property type */ |
11 | 11 | private $type; |
12 | 12 | |
13 | + /** |
|
14 | + * @param EasyRdf\Resource $resource |
|
15 | + */ |
|
13 | 16 | public function __construct($model, $vocab, $resource, $literal, $prop) |
14 | 17 | { |
15 | 18 | parent::__construct($model, $vocab, $resource); |