@@ -220,18 +220,18 @@ discard block |
||
220 | 220 | } |
221 | 221 | |
222 | 222 | $vocabs = $params->getVocabs(); |
223 | - $showDeprecated=false; |
|
223 | + $showDeprecated = false; |
|
224 | 224 | if (sizeof($vocabs) === 1) { // search within vocabulary |
225 | 225 | $voc = $vocabs[0]; |
226 | 226 | $sparql = $voc->getSparql(); |
227 | - $showDeprecated=$voc->getConfig()->getShowDeprecated(); |
|
227 | + $showDeprecated = $voc->getConfig()->getShowDeprecated(); |
|
228 | 228 | } else { // multi-vocabulary or global search |
229 | 229 | $voc = null; |
230 | 230 | $sparql = $this->getDefaultSparql(); |
231 | 231 | // @TODO : in a global search showDeprecated will always be false and cannot be set globally |
232 | 232 | } |
233 | 233 | |
234 | - $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params,$showDeprecated); |
|
234 | + $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params, $showDeprecated); |
|
235 | 235 | if ($params->getRest() && $results && $params->getSearchLimit() !== 0) { |
236 | 236 | $results = array_slice($results, $params->getOffset(), $params->getSearchLimit()); |
237 | 237 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | public function getVocabularyCategories() |
387 | 387 | { |
388 | 388 | $cats = $this->globalConfig->getGraph()->allOfType('skos:Concept'); |
389 | - if(empty($cats)) { |
|
389 | + if (empty($cats)) { |
|
390 | 390 | return array(new VocabularyCategory($this, null)); |
391 | 391 | } |
392 | 392 | |
@@ -467,9 +467,9 @@ discard block |
||
467 | 467 | } |
468 | 468 | |
469 | 469 | // if there are multiple vocabularies and one is the preferred vocabulary, return it |
470 | - if($preferredVocabId != null) { |
|
470 | + if ($preferredVocabId != null) { |
|
471 | 471 | foreach ($vocabs as $vocab) { |
472 | - if($vocab->getId() == $preferredVocabId) { |
|
472 | + if ($vocab->getId() == $preferredVocabId) { |
|
473 | 473 | try { |
474 | 474 | // double check that a label exists in the preferred vocabulary |
475 | 475 | if ($vocab->getConceptLabel($uri, null) !== null) { |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | } |
481 | 481 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
482 | 482 | if ($this->getConfig()->getLogCaughtExceptions()) { |
483 | - error_log('Caught exception: ' . $e->getMessage()); |
|
483 | + error_log('Caught exception: '.$e->getMessage()); |
|
484 | 484 | } |
485 | 485 | break; |
486 | 486 | } |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | } |
497 | 497 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
498 | 498 | if ($this->getConfig()->getLogCaughtExceptions()) { |
499 | - error_log('Caught exception: ' . $e->getMessage()); |
|
499 | + error_log('Caught exception: '.$e->getMessage()); |
|
500 | 500 | } |
501 | 501 | break; |
502 | 502 | } |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | // using apc cache for the resource if available |
567 | 567 | if ($this->globalConfig->getCache()->isAvailable()) { |
568 | 568 | // @codeCoverageIgnoreStart |
569 | - $key = 'fetch: ' . $uri; |
|
569 | + $key = 'fetch: '.$uri; |
|
570 | 570 | $resource = $this->globalConfig->getCache()->fetch($key); |
571 | 571 | if ($resource === null || $resource === false) { // was not found in cache, or previous request failed |
572 | 572 | $resource = $this->resolver->resolve($uri, $this->getConfig()->getHttpTimeout()); |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | */ |
588 | 588 | public function getSparqlImplementation($dialect, $endpoint, $graph) |
589 | 589 | { |
590 | - $classname = $dialect . "Sparql"; |
|
590 | + $classname = $dialect."Sparql"; |
|
591 | 591 | |
592 | 592 | return new $classname($endpoint, $graph, $this); |
593 | 593 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return isset($results[$lang]) ? $results[$lang] : null; |
53 | 53 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
54 | 54 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
55 | - error_log('Caught exception: ' . $e->getMessage()); |
|
55 | + error_log('Caught exception: '.$e->getMessage()); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | return isset($results) ? $results : null; |
75 | 75 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
76 | 76 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
77 | - error_log('Caught exception: ' . $e->getMessage()); |
|
77 | + error_log('Caught exception: '.$e->getMessage()); |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | } |
@@ -163,10 +163,10 @@ discard block |
||
163 | 163 | $sparql = $this->getSparql(); |
164 | 164 | $result = $sparql->queryConceptScheme($defaultcs); |
165 | 165 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
166 | - if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
167 | - error_log('Caught exception: ' . $e->getMessage()); |
|
168 | - } |
|
169 | - return null; |
|
166 | + if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
167 | + error_log('Caught exception: ' . $e->getMessage()); |
|
168 | + } |
|
169 | + return null; |
|
170 | 170 | } |
171 | 171 | $conceptscheme = $result->resource($defaultcs); |
172 | 172 | $this->order = array( |
@@ -253,9 +253,9 @@ discard block |
||
253 | 253 | try { |
254 | 254 | $conceptSchemes = $this->getSparql()->queryConceptSchemes($lang); |
255 | 255 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
256 | - if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
257 | - error_log('Caught exception: ' . $e->getMessage()); |
|
258 | - } |
|
256 | + if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
257 | + error_log('Caught exception: ' . $e->getMessage()); |
|
258 | + } |
|
259 | 259 | } |
260 | 260 | return $conceptSchemes; |
261 | 261 | } |
@@ -453,9 +453,9 @@ discard block |
||
453 | 453 | try { |
454 | 454 | $conceptInfo = $sparql->queryConceptInfo($uri, $this->config->getArrayClassURI(), array($this), $clang); |
455 | 455 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
456 | - if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
457 | - error_log('Caught exception: ' . $e->getMessage()); |
|
458 | - } |
|
456 | + if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
457 | + error_log('Caught exception: ' . $e->getMessage()); |
|
458 | + } |
|
459 | 459 | } |
460 | 460 | return $conceptInfo; |
461 | 461 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return $lname; |
103 | 103 | } |
104 | 104 | // already a full URI |
105 | - return $this->getUriSpace() . $lname; |
|
105 | + return $this->getUriSpace().$lname; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $result = $sparql->queryConceptScheme($defaultcs); |
165 | 165 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
166 | 166 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
167 | - error_log('Caught exception: ' . $e->getMessage()); |
|
167 | + error_log('Caught exception: '.$e->getMessage()); |
|
168 | 168 | } |
169 | 169 | return null; |
170 | 170 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | foreach ($conceptscheme->allLiterals($prop, null) as $val) { |
198 | 198 | $prop = (substr($prop, 0, 5) == 'dc11:') ? str_replace('dc11:', 'dc:', $prop) : $prop; |
199 | 199 | if ($val->getValue() instanceof DateTime) { |
200 | - $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang) . ' ' . Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang); |
|
200 | + $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang).' '.Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang); |
|
201 | 201 | } |
202 | 202 | $ret[$prop][] = $val; |
203 | 203 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $conceptSchemes = $this->getSparql()->queryConceptSchemes($lang); |
255 | 255 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
256 | 256 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
257 | - error_log('Caught exception: ' . $e->getMessage()); |
|
257 | + error_log('Caught exception: '.$e->getMessage()); |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 | return $conceptSchemes; |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | } |
326 | 326 | // don't know how to parse |
327 | 327 | $rev = $parts[2]; |
328 | - $datestr = $parts[3] . ' ' . $parts[4]; |
|
328 | + $datestr = $parts[3].' '.$parts[4]; |
|
329 | 329 | |
330 | 330 | return "$datestr (r$rev)"; |
331 | 331 | } |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | * @param string $array the uri of the concept array class, eg. isothes:ThesaurusArray |
337 | 337 | * @param string $group the uri of the concept group class, eg. isothes:ConceptGroup |
338 | 338 | */ |
339 | - public function getStatistics($lang = '', $array=null, $group=null) |
|
339 | + public function getStatistics($lang = '', $array = null, $group = null) |
|
340 | 340 | { |
341 | 341 | $sparql = $this->getSparql(); |
342 | 342 | // find the number of concepts |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $conceptInfo = $sparql->queryConceptInfo($uri, $this->config->getArrayClassURI(), array($this), $clang); |
455 | 455 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
456 | 456 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
457 | - error_log('Caught exception: ' . $e->getMessage()); |
|
457 | + error_log('Caught exception: '.$e->getMessage()); |
|
458 | 458 | } |
459 | 459 | } |
460 | 460 | return $conceptInfo; |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | return $this->getSparql()->queryChangeList($prop, $clang, $offset, $limit); |
665 | 665 | } |
666 | 666 | |
667 | - public function getTitle($lang=null) { |
|
667 | + public function getTitle($lang = null) { |
|
668 | 668 | return $this->config->getTitle($lang); |
669 | 669 | } |
670 | 670 |