@@ -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)) { |
@@ -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 | { |
@@ -3,6 +3,9 @@ |
||
3 | 3 | class LabelSkosXL extends DataObject |
4 | 4 | { |
5 | 5 | |
6 | + /** |
|
7 | + * @param Model $model |
|
8 | + */ |
|
6 | 9 | public function __construct($model, $resource) |
7 | 10 | { |
8 | 11 | parent::__construct($model, $resource); |
@@ -124,8 +124,8 @@ |
||
124 | 124 | */ |
125 | 125 | public function getEnvLang() |
126 | 126 | { |
127 | - // get language from locale, same as used by gettext, set by Controller |
|
128 | - return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
127 | + // get language from locale, same as used by gettext, set by Controller |
|
128 | + return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -7,11 +7,11 @@ |
||
7 | 7 | abstract class BaseConfig extends DataObject |
8 | 8 | { |
9 | 9 | |
10 | - /** |
|
11 | - * Returns a boolean value based on a literal value from the config.ttl configuration. |
|
12 | - * @param string $property the property to query |
|
13 | - * @param boolean $default the default value if the value is not set in configuration |
|
14 | - */ |
|
10 | + /** |
|
11 | + * Returns a boolean value based on a literal value from the config.ttl configuration. |
|
12 | + * @param string $property the property to query |
|
13 | + * @param boolean $default the default value if the value is not set in configuration |
|
14 | + */ |
|
15 | 15 | protected function getBoolean($property, $default = false) |
16 | 16 | { |
17 | 17 | $val = $this->getResource()->getLiteral($property); |
@@ -10,6 +10,11 @@ |
||
10 | 10 | /** property type */ |
11 | 11 | private $type; |
12 | 12 | |
13 | + /** |
|
14 | + * @param Model $model |
|
15 | + * @param Vocabulary $vocab |
|
16 | + * @param Resource $resource |
|
17 | + */ |
|
13 | 18 | public function __construct($model, $vocab, $resource, $literal, $prop) |
14 | 19 | { |
15 | 20 | parent::__construct($model, $vocab, $resource); |
@@ -517,13 +517,13 @@ |
||
517 | 517 | |
518 | 518 | $defaultPropLabel = $this->model->getDefaultSparql()->queryLabel($longUri, ''); |
519 | 519 | |
520 | - if($envLangLabels) { |
|
521 | - $proplabel = $envLangLabels[$this->getEnvLang()]; |
|
520 | + if($envLangLabels) { |
|
521 | + $proplabel = $envLangLabels[$this->getEnvLang()]; |
|
522 | 522 | } else { |
523 | - if($defaultPropLabel) { |
|
524 | - $proplabel = $defaultPropLabel['']; |
|
525 | - } |
|
526 | - } |
|
523 | + if($defaultPropLabel) { |
|
524 | + $proplabel = $defaultPropLabel['']; |
|
525 | + } |
|
526 | + } |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | // look for superproperties in the current graph |
@@ -74,6 +74,7 @@ discard block |
||
74 | 74 | * @param Vocabulary $vocab |
75 | 75 | * @param EasyRdf\Resource $resource |
76 | 76 | * @param EasyRdf\Graph $graph |
77 | + * @param string|null $clang |
|
77 | 78 | */ |
78 | 79 | public function __construct($model, $vocab, $resource, $graph, $clang) |
79 | 80 | { |
@@ -738,6 +739,7 @@ discard block |
||
738 | 739 | |
739 | 740 | /** |
740 | 741 | * Gets the groups/arrays the concept belongs to. |
742 | + * @param boolean $includeArrays |
|
741 | 743 | */ |
742 | 744 | private function getCollections($includeArrays) { |
743 | 745 | $groups = array(); |
@@ -97,6 +97,9 @@ discard block |
||
97 | 97 | return $this->returnJson($ret); |
98 | 98 | } |
99 | 99 | |
100 | + /** |
|
101 | + * @param Request $request |
|
102 | + */ |
|
100 | 103 | private function constructSearchParameters($request) |
101 | 104 | { |
102 | 105 | $parameters = new ConceptSearchParameters($request, $this->model->getConfig(), true); |
@@ -112,6 +115,10 @@ discard block |
||
112 | 115 | return $parameters; |
113 | 116 | } |
114 | 117 | |
118 | + /** |
|
119 | + * @param Request $request |
|
120 | + * @param ConceptSearchParameters $parameters |
|
121 | + */ |
|
115 | 122 | private function transformSearchResults($request, $results, $parameters) |
116 | 123 | { |
117 | 124 | // before serializing to JSON, get rid of the Vocabulary object that came with each resource |
@@ -408,6 +415,10 @@ discard block |
||
408 | 415 | return $this->returnJson($ret); |
409 | 416 | } |
410 | 417 | |
418 | + /** |
|
419 | + * @param string $label |
|
420 | + * @param string $lang |
|
421 | + */ |
|
411 | 422 | private function findLookupHits($results, $label, $lang) |
412 | 423 | { |
413 | 424 | $hits = array(); |
@@ -469,6 +480,9 @@ discard block |
||
469 | 480 | return $hits; |
470 | 481 | } |
471 | 482 | |
483 | + /** |
|
484 | + * @param string $lang |
|
485 | + */ |
|
472 | 486 | private function transformLookupResults($lang, $hits) |
473 | 487 | { |
474 | 488 | if (sizeof($hits) == 0) { |
@@ -540,6 +554,9 @@ discard block |
||
540 | 554 | return $this->returnJson($ret); |
541 | 555 | } |
542 | 556 | |
557 | + /** |
|
558 | + * @param Request $request |
|
559 | + */ |
|
543 | 560 | private function redirectToVocabData($request) { |
544 | 561 | $urls = $request->getVocab()->getConfig()->getDataURLs(); |
545 | 562 | if (sizeof($urls) == 0) { |
@@ -555,6 +572,9 @@ discard block |
||
555 | 572 | header("Location: " . $urls[$format]); |
556 | 573 | } |
557 | 574 | |
575 | + /** |
|
576 | + * @param string $format |
|
577 | + */ |
|
558 | 578 | private function returnDataResults($results, $format) { |
559 | 579 | if ($format == 'application/ld+json' || $format == 'application/json') { |
560 | 580 | // further compact JSON-LD document using a context |
@@ -650,6 +670,12 @@ discard block |
||
650 | 670 | return $this->returnJson($ret); |
651 | 671 | } |
652 | 672 | |
673 | + /** |
|
674 | + * @param string $uri |
|
675 | + * @param string $lang |
|
676 | + * @param string $propname |
|
677 | + * @param string $propuri |
|
678 | + */ |
|
653 | 679 | private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri) |
654 | 680 | { |
655 | 681 | $results = array(); |
@@ -665,6 +691,14 @@ discard block |
||
665 | 691 | return $ret; |
666 | 692 | } |
667 | 693 | |
694 | + /** |
|
695 | + * @param string $uri |
|
696 | + * @param string $lang |
|
697 | + * @param string $tpropname |
|
698 | + * @param string $tpropuri |
|
699 | + * @param string $dpropname |
|
700 | + * @param string $dpropuri |
|
701 | + */ |
|
668 | 702 | private function transformTransitivePropertyResults($uri, $lang, $objects, $tpropname, $tpropuri, $dpropname, $dpropuri) |
669 | 703 | { |
670 | 704 | $results = array(); |