Completed
Pull Request — master (#899)
by Dan Michael O.
01:48
created
model/VocabularyCategory.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
model/SkosmosTurtleParser.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -55,6 +55,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
model/LabelSkosXL.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -3,6 +3,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
model/ConceptPropertyValueLiteral.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -10,6 +10,11 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
model/Concept.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -74,6 +74,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
model/sparql/GenericSparql.php 1 patch
Doc Comments   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -289,6 +289,7 @@  discard block
 block discarded – undo
289 289
     /**
290 290
      * Counts the number of concepts in a easyRDF graph with a specific language.
291 291
      * @param array $langs Languages to query for
292
+     * @param string[] $classes
292 293
      * @return Array containing count of concepts for each language and property.
293 294
      */
294 295
     public function countLangConcepts($langs, $classes = null) {
@@ -473,7 +474,7 @@  discard block
 block discarded – undo
473 474
      * Returns information (as a graph) for one or more concept URIs
474 475
      * @param mixed $uris concept URI (string) or array of URIs
475 476
      * @param string|null $arrayClass the URI for thesaurus array class, or null if not used
476
-     * @param \Vocabulary[]|null $vocabs vocabularies to target
477
+     * @param Vocabulary[] $vocabs vocabularies to target
477 478
      * @return \EasyRdf\Graph
478 479
      */
479 480
     public function queryConceptInfoGraph($uris, $arrayClass = null, $vocabs = array()) {
@@ -489,7 +490,7 @@  discard block
 block discarded – undo
489 490
 
490 491
     /**
491 492
      * Returns information (as an array of Concept objects) for one or more concept URIs
492
-     * @param mixed $uris concept URI (string) or array of URIs
493
+     * @param string $uris concept URI (string) or array of URIs
493 494
      * @param string|null $arrayClass the URI for thesaurus array class, or null if not used
494 495
      * @param \Vocabulary[] $vocabs vocabularies to target
495 496
      * @param string|null $clang content language
@@ -704,7 +705,7 @@  discard block
 block discarded – undo
704 705
 
705 706
     /**
706 707
      * Generate a VALUES clause for limiting the targeted graphs.
707
-     * @param Vocabulary[]|null $vocabs array of Vocabulary objects to target
708
+     * @param Vocabulary[] $vocabs array of Vocabulary objects to target
708 709
      * @return string VALUES clause, or "" if not necessary to limit
709 710
      */
710 711
     protected function formatValuesGraph($vocabs) {
@@ -884,6 +885,7 @@  discard block
 block discarded – undo
884 885
      * @param string $searchLang language code used for matching labels (null means any language)
885 886
      * @param string[] $props properties to target e.g. array('skos:prefLabel','skos:altLabel')
886 887
      * @param boolean $unique restrict results to unique concepts (default: false)
888
+     * @param string $filterGraph
887 889
      * @return string sparql query
888 890
      */
889 891
     protected function generateConceptSearchQueryInner($term, $lang, $searchLang, $props, $unique, $filterGraph)
@@ -1158,6 +1160,7 @@  discard block
 block discarded – undo
1158 1160
     /**
1159 1161
      * Generates sparql query clauses used for creating the alphabetical index.
1160 1162
      * @param string $letter the letter (or special class) to search for
1163
+     * @param string $lang
1161 1164
      * @return array of sparql query clause strings
1162 1165
      */
1163 1166
     private function formatFilterConditions($letter, $lang) {
@@ -1325,6 +1328,7 @@  discard block
 block discarded – undo
1325 1328
     /**
1326 1329
      * Query for the first characters (letter or otherwise) of the labels in the particular language.
1327 1330
      * @param string $lang language
1331
+     * @param string[] $classes
1328 1332
      * @return array array of characters
1329 1333
      */
1330 1334
     public function queryFirstCharacters($lang, $classes = null) {
@@ -1647,7 +1651,7 @@  discard block
 block discarded – undo
1647 1651
     /**
1648 1652
      * Query a single transitive property of a concept.
1649 1653
      * @param string $uri
1650
-     * @param array $props the property/properties.
1654
+     * @param string[] $props the property/properties.
1651 1655
      * @param string $lang
1652 1656
      * @param string $fallbacklang language to use if label is not available in the preferred language
1653 1657
      * @param integer $limit
Please login to merge, or discard this patch.
model/VocabularyConfig.php 1 patch
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -266,6 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
     /**
268 268
      * Returns skosmos:marcSourcecode value set in config.ttl.
269
+     * @param string $lang
269 270
      * @return string marcsource name
270 271
      */
271 272
     public function getMarcSourceCode($lang = null)
@@ -275,7 +276,7 @@  discard block
 block discarded – undo
275 276
 
276 277
     /**
277 278
      * Returns a boolean value set in the config.ttl config.
278
-     * @return array array of concept class URIs (can be empty)
279
+     * @return string[] array of concept class URIs (can be empty)
279 280
      */
280 281
     public function getIndexClasses()
281 282
     {
@@ -284,7 +285,7 @@  discard block
 block discarded – undo
284 285
 
285 286
     /**
286 287
      * Returns skosmos:externalProperty values set in the config.ttl config.
287
-     * @return array array of external property URIs (can be empty)
288
+     * @return string[] array of external property URIs (can be empty)
288 289
      */
289 290
     public function getExtProperties()
290 291
     {
@@ -410,6 +411,7 @@  discard block
 block discarded – undo
410 411
 
411 412
     /**
412 413
      * Returns the vocabulary dc:type value(s) with their labels and uris, if set in the vocabulary configuration.
414
+     * @param string $lang
413 415
      * @return array of objects or an empty array
414 416
      */
415 417
     public function getTypes($lang = null)
Please login to merge, or discard this patch.
controller/RestController.php 1 patch
Doc Comments   +35 added lines patch added patch discarded remove patch
@@ -97,6 +97,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
@@ -407,6 +414,10 @@  discard block
 block discarded – undo
407 414
         return $this->returnJson($ret);
408 415
     }
409 416
 
417
+    /**
418
+     * @param string $label
419
+     * @param string $lang
420
+     */
410 421
     private function findLookupHits($results, $label, $lang)
411 422
     {
412 423
         $hits = array();
@@ -468,6 +479,9 @@  discard block
 block discarded – undo
468 479
         return $hits;
469 480
     }
470 481
 
482
+    /**
483
+     * @param string $lang
484
+     */
471 485
     private function transformLookupResults($lang, $hits)
472 486
     {
473 487
         if (sizeof($hits) == 0) {
@@ -539,6 +553,9 @@  discard block
 block discarded – undo
539 553
         return $this->returnJson($ret);
540 554
     }
541 555
 
556
+    /**
557
+     * @param Request $request
558
+     */
542 559
     private function redirectToVocabData($request) {
543 560
         $urls = $request->getVocab()->getConfig()->getDataURLs();
544 561
         if (sizeof($urls) == 0) {
@@ -554,6 +571,10 @@  discard block
 block discarded – undo
554 571
         header("Location: " . $urls[$format]);
555 572
     }
556 573
 
574
+    /**
575
+     * @param string $results
576
+     * @param string $format
577
+     */
557 578
     private function returnDataResults($results, $format) {
558 579
         if ($format == 'application/ld+json' || $format == 'application/json') {
559 580
             // further compact JSON-LD document using a context
@@ -683,6 +704,12 @@  discard block
 block discarded – undo
683 704
         return $this->returnJson($ret);
684 705
     }
685 706
 
707
+    /**
708
+     * @param string $uri
709
+     * @param string $lang
710
+     * @param string $propname
711
+     * @param string $propuri
712
+     */
686 713
     private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri)
687 714
     {
688 715
         $results = array();
@@ -698,6 +725,14 @@  discard block
 block discarded – undo
698 725
         return $ret;
699 726
     }
700 727
 
728
+    /**
729
+     * @param string $uri
730
+     * @param string $lang
731
+     * @param string $tpropname
732
+     * @param string $tpropuri
733
+     * @param string $dpropname
734
+     * @param string $dpropuri
735
+     */
701 736
     private function transformTransitivePropertyResults($uri, $lang, $objects, $tpropname, $tpropuri, $dpropname, $dpropuri)
702 737
     {
703 738
         $results = array();
Please login to merge, or discard this patch.
controller/WebController.php 1 patch
Doc Comments   +8 added lines, -1 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      *
263 263
      * @param Concept $concept
264 264
      * @param Vocabulary $vocab
265
-     * @return DateTime|null
265
+     * @return DateTime
266 266
      */
267 267
     protected function getModifiedDate(Concept $concept, Vocabulary $vocab)
268 268
     {
@@ -438,6 +438,11 @@  discard block
 block discarded – undo
438 438
             ));
439 439
     }
440 440
 
441
+    /**
442
+     * @param string $fromName
443
+     * @param string|null $fromEmail
444
+     * @param string $sender
445
+     */
441 446
     private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender)
442 447
     {
443 448
         $headers = "MIME-Version: 1.0″ . '\r\n";
@@ -460,6 +465,7 @@  discard block
 block discarded – undo
460 465
      * @param string $fromName senders own name.
461 466
      * @param string $fromEmail senders email adress.
462 467
      * @param string $fromVocab which vocabulary is the feedback related to.
468
+     * @param string $toMail
463 469
      */
464 470
     public function sendFeedback($request, $message, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null)
465 471
     {
@@ -740,6 +746,7 @@  discard block
 block discarded – undo
740 746
 
741 747
     /**
742 748
      * Invokes a very generic errorpage.
749
+     * @param string $message
743 750
      */
744 751
     public function invokeGenericErrorPage($request, $message = null)
745 752
     {
Please login to merge, or discard this patch.