@@ -55,8 +55,9 @@ |
||
55 | 55 | |
56 | 56 | // not found with selected language, try any language |
57 | 57 | $literal = $this->getResource()->getLiteral($property); |
58 | - if ($literal) |
|
59 | - return $literal->getValue(); |
|
58 | + if ($literal) { |
|
59 | + return $literal->getValue(); |
|
60 | + } |
|
60 | 61 | |
61 | 62 | return $default; |
62 | 63 | } |
@@ -58,8 +58,9 @@ discard block |
||
58 | 58 | public function getShortName() |
59 | 59 | { |
60 | 60 | $shortname = $this->getLiteral('skosmos:shortName'); |
61 | - if ($shortname) |
|
62 | - return $shortname; |
|
61 | + if ($shortname) { |
|
62 | + return $shortname; |
|
63 | + } |
|
63 | 64 | |
64 | 65 | // if no shortname exists fall back to the id |
65 | 66 | return $this->getId(); |
@@ -194,10 +195,12 @@ discard block |
||
194 | 195 | $ret = array(); |
195 | 196 | foreach ($resources as $res) { |
196 | 197 | $prop = $res->getURI(); |
197 | - if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible |
|
198 | + if (EasyRdf\RdfNamespace::shorten($prop) !== null) { |
|
199 | + // shortening property labels if possible |
|
198 | 200 | { |
199 | 201 | $prop = EasyRdf\RdfNamespace::shorten($prop); |
200 | 202 | } |
203 | + } |
|
201 | 204 | |
202 | 205 | $ret[] = $prop; |
203 | 206 | } |
@@ -214,10 +217,12 @@ discard block |
||
214 | 217 | $resources = $this->resource->allResources("skosmos:hasMultiLingualProperty"); |
215 | 218 | foreach ($resources as $res) { |
216 | 219 | $prop = $res->getURI(); |
217 | - if (EasyRdf\RdfNamespace::shorten($prop) !== null) // shortening property labels if possible |
|
220 | + if (EasyRdf\RdfNamespace::shorten($prop) !== null) { |
|
221 | + // shortening property labels if possible |
|
218 | 222 | { |
219 | 223 | $prop = EasyRdf\RdfNamespace::shorten($prop); |
220 | 224 | } |
225 | + } |
|
221 | 226 | |
222 | 227 | if ($prop === $property) { |
223 | 228 | return true; |
@@ -329,11 +334,12 @@ discard block |
||
329 | 334 | public function getId() |
330 | 335 | { |
331 | 336 | $uriparts = explode("#", $this->resource->getURI()); |
332 | - if (count($uriparts) != 1) |
|
333 | - // hash namespace |
|
337 | + if (count($uriparts) != 1) { |
|
338 | + // hash namespace |
|
334 | 339 | { |
335 | 340 | return $uriparts[1]; |
336 | 341 | } |
342 | + } |
|
337 | 343 | |
338 | 344 | // slash namespace |
339 | 345 | $uriparts = explode("/", $this->resource->getURI()); |
@@ -361,10 +367,12 @@ discard block |
||
361 | 367 | $ret = array(); |
362 | 368 | foreach ($resources as $res) { |
363 | 369 | $prop = $res->getURI(); |
364 | - if (EasyRdf\RdfNamespace::shorten($prop) !== null) // prefixing if possible |
|
370 | + if (EasyRdf\RdfNamespace::shorten($prop) !== null) { |
|
371 | + // prefixing if possible |
|
365 | 372 | { |
366 | 373 | $prop = EasyRdf\RdfNamespace::shorten($prop); |
367 | 374 | } |
375 | + } |
|
368 | 376 | |
369 | 377 | $ret[] = $prop; |
370 | 378 | } |
@@ -137,10 +137,11 @@ discard block |
||
137 | 137 | public function labelSorter($conceptPropertyValueArray) { |
138 | 138 | usort($conceptPropertyValueArray, function($lit, $lit2) { |
139 | 139 | if ($lit->getType() === $lit2->getType()) { |
140 | - if ($lit->getLabel() === $lit2->getLabel()) return 0; |
|
140 | + if ($lit->getLabel() === $lit2->getLabel()) { |
|
141 | + return 0; |
|
142 | + } |
|
141 | 143 | return $lit->getLabel() < $lit2->getLabel() ? -1 : 1; |
142 | - } |
|
143 | - else if ($lit->getType() === "skos:prefLabel") { |
|
144 | + } else if ($lit->getType() === "skos:prefLabel") { |
|
144 | 145 | return -1; |
145 | 146 | } |
146 | 147 | return 1; |
@@ -465,11 +466,17 @@ discard block |
||
465 | 466 | $subject = $this->model->getConfig()->getServiceName() . " feedback"; |
466 | 467 | // determine the sender address of the message |
467 | 468 | $sender = $this->model->getConfig()->getFeedbackSender(); |
468 | - if (empty($sender)) $sender = $envelopeSender; |
|
469 | - if (empty($sender)) $sender = $this->model->getConfig()->getFeedbackAddress(); |
|
469 | + if (empty($sender)) { |
|
470 | + $sender = $envelopeSender; |
|
471 | + } |
|
472 | + if (empty($sender)) { |
|
473 | + $sender = $this->model->getConfig()->getFeedbackAddress(); |
|
474 | + } |
|
470 | 475 | |
471 | 476 | // determine sender name - default to "anonymous user" if not given by user |
472 | - if (empty($fromName)) $fromName = "anonymous user"; |
|
477 | + if (empty($fromName)) { |
|
478 | + $fromName = "anonymous user"; |
|
479 | + } |
|
473 | 480 | |
474 | 481 | $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender); |
475 | 482 | $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; |