@@ -102,8 +102,7 @@ discard block |
||
102 | 102 | foreach ($vocabularyPlugins as $plugin) { |
103 | 103 | if ($plugin instanceof EasyRdf\Literal) { |
104 | 104 | $pluginArray[] = $plugin->getValue(); |
105 | - } |
|
106 | - else { |
|
105 | + } else { |
|
107 | 106 | $pluginArray[] = $plugin->getLiteral($this->getUsePluginAsLiteral()); |
108 | 107 | } |
109 | 108 | } |
@@ -299,8 +298,9 @@ discard block |
||
299 | 298 | public function getShortName() |
300 | 299 | { |
301 | 300 | $shortname = $this->getLiteral('skosmos:shortName'); |
302 | - if ($shortname) |
|
303 | - return $shortname; |
|
301 | + if ($shortname) { |
|
302 | + return $shortname; |
|
303 | + } |
|
304 | 304 | |
305 | 305 | // if no shortname exists fall back to the id |
306 | 306 | return $this->getId(); |
@@ -460,10 +460,12 @@ discard block |
||
460 | 460 | $ret = array(); |
461 | 461 | foreach ($resources as $res) { |
462 | 462 | $prop = $res->getURI(); |
463 | - if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible |
|
463 | + if (EasyRdf\RdfNamespace::shorten($prop) !== null) { |
|
464 | + // shortening property labels if possible |
|
464 | 465 | { |
465 | 466 | $prop = EasyRdf\RdfNamespace::shorten($prop); |
466 | 467 | } |
468 | + } |
|
467 | 469 | |
468 | 470 | $ret[] = $prop; |
469 | 471 | } |
@@ -480,10 +482,12 @@ discard block |
||
480 | 482 | $resources = $this->resource->allResources("skosmos:hasMultiLingualProperty"); |
481 | 483 | foreach ($resources as $res) { |
482 | 484 | $prop = $res->getURI(); |
483 | - if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible |
|
485 | + if (EasyRdf\RdfNamespace::shorten($prop) !== null) { |
|
486 | + // shortening property labels if possible |
|
484 | 487 | { |
485 | 488 | $prop = EasyRdf\RdfNamespace::shorten($prop); |
486 | 489 | } |
490 | + } |
|
487 | 491 | |
488 | 492 | if ($prop === $property) { |
489 | 493 | return true; |
@@ -638,11 +642,12 @@ discard block |
||
638 | 642 | public function getId() |
639 | 643 | { |
640 | 644 | $uriparts = explode("#", $this->resource->getURI()); |
641 | - if (count($uriparts) != 1) |
|
642 | - // hash namespace |
|
645 | + if (count($uriparts) != 1) { |
|
646 | + // hash namespace |
|
643 | 647 | { |
644 | 648 | return $uriparts[1]; |
645 | 649 | } |
650 | + } |
|
646 | 651 | |
647 | 652 | // slash namespace |
648 | 653 | $uriparts = explode("/", $this->resource->getURI()); |
@@ -670,10 +675,12 @@ discard block |
||
670 | 675 | $ret = array(); |
671 | 676 | foreach ($resources as $res) { |
672 | 677 | $prop = $res->getURI(); |
673 | - if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible |
|
678 | + if (EasyRdf\RdfNamespace::shorten($prop) !== null) { |
|
679 | + // prefixing if possible |
|
674 | 680 | { |
675 | 681 | $prop = EasyRdf\RdfNamespace::shorten($prop); |
676 | 682 | } |
683 | + } |
|
677 | 684 | |
678 | 685 | $ret[] = $prop; |
679 | 686 | } |