@@ -235,6 +235,11 @@ discard block |
||
235 | 235 | )); |
236 | 236 | } |
237 | 237 | |
238 | + /** |
|
239 | + * @param string $fromName |
|
240 | + * @param string|null $fromEmail |
|
241 | + * @param string $sender |
|
242 | + */ |
|
238 | 243 | private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) |
239 | 244 | { |
240 | 245 | $headers = "MIME-Version: 1.0" . "\r\n"; |
@@ -256,6 +261,7 @@ discard block |
||
256 | 261 | * @param string $fromName senders own name. |
257 | 262 | * @param string $fromEmail senders email address. |
258 | 263 | * @param string $fromVocab which vocabulary is the feedback related to. |
264 | + * @param string $toMail |
|
259 | 265 | */ |
260 | 266 | public function sendFeedback($request, $message, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null) |
261 | 267 | { |
@@ -569,6 +575,7 @@ discard block |
||
569 | 575 | |
570 | 576 | /** |
571 | 577 | * Invokes a very generic errorpage. |
578 | + * @param Request $request |
|
572 | 579 | */ |
573 | 580 | public function invokeGenericErrorPage($request, $message = null) |
574 | 581 | { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // specify where to look for templates and cache |
38 | 38 | $loader = new Twig_Loader_Filesystem('view'); |
39 | 39 | // initialize Twig environment |
40 | - $this->twig = new Twig_Environment($loader, array('cache' => $tmpDir,'auto_reload' => true)); |
|
40 | + $this->twig = new Twig_Environment($loader, array('cache' => $tmpDir, 'auto_reload' => true)); |
|
41 | 41 | $this->twig->addExtension(new Twig_Extensions_Extension_I18n()); |
42 | 42 | // used for setting the base href for the relative urls |
43 | 43 | $this->twig->addGlobal("BaseHref", $this->getBaseHref()); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $this->twig->addFilter(new Twig_SimpleFilter('link_url', array($this, 'linkUrlFilter'))); |
61 | 61 | |
62 | 62 | // register a Twig filter for generating strings from language codes with CLDR |
63 | - $langFilter = new Twig_SimpleFilter('lang_name', function ($langcode, $lang) { |
|
63 | + $langFilter = new Twig_SimpleFilter('lang_name', function($langcode, $lang) { |
|
64 | 64 | return Language::getName($langcode, $lang); |
65 | 65 | }); |
66 | 66 | $this->twig->addFilter($langFilter); |
@@ -237,17 +237,17 @@ discard block |
||
237 | 237 | |
238 | 238 | private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) |
239 | 239 | { |
240 | - $headers = "MIME-Version: 1.0" . "\r\n"; |
|
241 | - $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; |
|
240 | + $headers = "MIME-Version: 1.0"."\r\n"; |
|
241 | + $headers .= "Content-type: text/html; charset=UTF-8"."\r\n"; |
|
242 | 242 | if (!empty($toMail)) { |
243 | - $headers .= "Cc: " . $this->model->getConfig()->getFeedbackAddress() . "\r\n"; |
|
243 | + $headers .= "Cc: ".$this->model->getConfig()->getFeedbackAddress()."\r\n"; |
|
244 | 244 | } |
245 | 245 | if (!empty($fromEmail)) { |
246 | 246 | $headers .= "Reply-To: $fromName <$fromEmail>\r\n"; |
247 | 247 | } |
248 | 248 | |
249 | 249 | $service = $this->model->getConfig()->getServiceName(); |
250 | - return $headers . "From: $fromName via $service <$sender>"; |
|
250 | + return $headers."From: $fromName via $service <$sender>"; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | { |
262 | 262 | $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); |
263 | 263 | if ($fromVocab !== null && $fromVocab !== '') { |
264 | - $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "<br />" . $message; |
|
264 | + $message = 'Feedback from vocab: '.strtoupper($fromVocab)."<br />".$message; |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender(); |
268 | - $subject = $this->model->getConfig()->getServiceName() . " feedback"; |
|
268 | + $subject = $this->model->getConfig()->getServiceName()." feedback"; |
|
269 | 269 | // determine the sender address of the message |
270 | 270 | $sender = $this->model->getConfig()->getFeedbackSender(); |
271 | 271 | if (empty($sender)) $sender = $envelopeSender; |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; |
279 | 279 | |
280 | 280 | // adding some information about the user for debugging purposes. |
281 | - $message = $message . "<br /><br /> Debugging information:" |
|
282 | - . "<br />Timestamp: " . date(DATE_RFC2822) |
|
283 | - . "<br />User agent: " . $request->getServerConstant('HTTP_USER_AGENT') |
|
284 | - . "<br />Referer: " . $request->getServerConstant('HTTP_REFERER'); |
|
281 | + $message = $message."<br /><br /> Debugging information:" |
|
282 | + . "<br />Timestamp: ".date(DATE_RFC2822) |
|
283 | + . "<br />User agent: ".$request->getServerConstant('HTTP_USER_AGENT') |
|
284 | + . "<br />Referer: ".$request->getServerConstant('HTTP_REFERER'); |
|
285 | 285 | |
286 | 286 | try { |
287 | 287 | mail($toAddress, $subject, $message, $headers, $params); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | header("HTTP/1.0 404 Not Found"); |
290 | 290 | $template = $this->twig->loadTemplate('error-page.twig'); |
291 | 291 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
292 | - error_log('Caught exception: ' . $e->getMessage()); |
|
292 | + error_log('Caught exception: '.$e->getMessage()); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | echo $template->render( |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : null; |
337 | 337 | $vocabObjects = array(); |
338 | 338 | if ($vocids) { |
339 | - foreach($vocids as $vocid) { |
|
339 | + foreach ($vocids as $vocid) { |
|
340 | 340 | try { |
341 | 341 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
342 | 342 | } catch (Exception $e) { |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | $vocabObjects = $this->model->getVocabularies(); |
357 | 357 | } |
358 | 358 | $defaultEndpoint = $this->model->getConfig()->getDefaultEndpoint(); |
359 | - foreach($vocabObjects as $voc) { |
|
359 | + foreach ($vocabObjects as $voc) { |
|
360 | 360 | if ($voc->getEndpoint() !== $defaultEndpoint) { |
361 | 361 | $nondefaultEndpointVocs[] = $voc; |
362 | 362 | } |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | $errored = true; |
376 | 376 | header("HTTP/1.0 500 Internal Server Error"); |
377 | 377 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
378 | - error_log('Caught exception: ' . $e->getMessage()); |
|
378 | + error_log('Caught exception: '.$e->getMessage()); |
|
379 | 379 | } |
380 | 380 | } |
381 | 381 | $vocabList = $this->model->getVocabularyList(); |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | 'search_count' => $counts, |
388 | 388 | 'languages' => $this->languages, |
389 | 389 | 'search_results' => $searchResults, |
390 | - 'rest' => $parameters->getOffset()>0, |
|
390 | + 'rest' => $parameters->getOffset() > 0, |
|
391 | 391 | 'global_search' => true, |
392 | 392 | 'search_failed' => $errored, |
393 | 393 | 'skipped_vocabs' => $nondefaultEndpointVocs, |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | } catch (Exception $e) { |
416 | 416 | header("HTTP/1.0 500 Internal Server Error"); |
417 | 417 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
418 | - error_log('Caught exception: ' . $e->getMessage()); |
|
418 | + error_log('Caught exception: '.$e->getMessage()); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | echo $template->render( |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | } catch (Exception $e) { |
440 | 440 | header("HTTP/1.0 404 Not Found"); |
441 | 441 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
442 | - error_log('Caught exception: ' . $e->getMessage()); |
|
442 | + error_log('Caught exception: '.$e->getMessage()); |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | echo $template->render( |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | 'vocab' => $vocab, |
458 | 458 | 'search_results' => $searchResults, |
459 | 459 | 'search_count' => $counts, |
460 | - 'rest' => $parameters->getOffset()>0, |
|
460 | + 'rest' => $parameters->getOffset() > 0, |
|
461 | 461 | 'limit_parent' => $parameters->getParentLimit(), |
462 | 462 | 'limit_type' => $request->getQueryParam('type') ? explode('+', $request->getQueryParam('type')) : null, |
463 | 463 | 'limit_group' => $parameters->getGroupLimit(), |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | * Loads and renders the view containing a list of recent changes in the vocabulary. |
590 | 590 | * @param Request $request |
591 | 591 | */ |
592 | - public function invokeChangeList($request, $prop='dc:created') |
|
592 | + public function invokeChangeList($request, $prop = 'dc:created') |
|
593 | 593 | { |
594 | 594 | $offset = ($request->getQueryParam('offset') && is_numeric($request->getQueryParam('offset')) && $request->getQueryParam('offset') >= 0) ? $request->getQueryParam('offset') : 0; |
595 | 595 | $limit = ($request->getQueryParam('limit') && is_numeric($request->getQueryParam('limit')) && $request->getQueryParam('limit') >= 0) ? $request->getQueryParam('limit') : 200; |
@@ -617,7 +617,7 @@ discard block |
||
617 | 617 | * @param int $limit maximum number of concepts to return |
618 | 618 | * @return Array list of concepts |
619 | 619 | */ |
620 | - public function getChangeList($request, $prop, $offset=0, $limit=200) |
|
620 | + public function getChangeList($request, $prop, $offset = 0, $limit = 200) |
|
621 | 621 | { |
622 | 622 | // set language parameters for gettext |
623 | 623 | $this->setLanguageProperties($request->getLang()); |
@@ -633,9 +633,9 @@ discard block |
||
633 | 633 | public function formatChangeList($changeList, $lang) |
634 | 634 | { |
635 | 635 | $formatByDate = array(); |
636 | - foreach($changeList as $concept) { |
|
636 | + foreach ($changeList as $concept) { |
|
637 | 637 | $concept['datestring'] = Punic\Calendar::formatDate($concept['date'], 'medium', $lang); |
638 | - $formatByDate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true) . Punic\Calendar::format($concept['date'], ' y', $lang) ][strtolower($concept['prefLabel'])] = $concept; |
|
638 | + $formatByDate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true).Punic\Calendar::format($concept['date'], ' y', $lang)][strtolower($concept['prefLabel'])] = $concept; |
|
639 | 639 | } |
640 | 640 | return $formatByDate; |
641 | 641 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | /** |
65 | 65 | * Return the logging facility |
66 | - * @return object logger |
|
66 | + * @return Monolog\Logger logger |
|
67 | 67 | */ |
68 | 68 | public function getLogger() { |
69 | 69 | return $this->logger; |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | * Get the label for a resource, preferring 1. the given language 2. configured languages 3. any language. |
547 | 547 | * @param EasyRdf\Resource $res resource whose label to return |
548 | 548 | * @param string $lang preferred language |
549 | - * @return EasyRdf\Literal label as an EasyRdf\Literal object, or null if not found |
|
549 | + * @return string label as an EasyRdf\Literal object, or null if not found |
|
550 | 550 | */ |
551 | 551 | public function getResourceLabel($res, $lang) |
552 | 552 | { |
@@ -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) { |
@@ -478,9 +478,9 @@ discard block |
||
478 | 478 | // not found in preferred vocabulary, fall back to next method |
479 | 479 | break; |
480 | 480 | } |
481 | - } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
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 | } |
@@ -494,9 +494,9 @@ discard block |
||
494 | 494 | if ($vocab->getConceptLabel($uri, null) !== null) { |
495 | 495 | return $vocab; |
496 | 496 | } |
497 | - } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
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 | } |
@@ -354,10 +354,12 @@ |
||
354 | 354 | // register vocabulary ids as RDF namespace prefixes |
355 | 355 | $prefix = preg_replace('/\W+/', '', $voc->getId()); // strip non-word characters |
356 | 356 | try { |
357 | - if ($prefix != '' && EasyRdf\RdfNamespace::get($prefix) === null) // if not already defined |
|
357 | + if ($prefix != '' && EasyRdf\RdfNamespace::get($prefix) === null) { |
|
358 | + // if not already defined |
|
358 | 359 | { |
359 | 360 | EasyRdf\RdfNamespace::set($prefix, $voc->getUriSpace()); |
360 | 361 | } |
362 | + } |
|
361 | 363 | |
362 | 364 | } catch (Exception $e) { |
363 | 365 | // not valid as namespace identifier, ignore |
@@ -165,10 +165,10 @@ discard block |
||
165 | 165 | $sparql = $this->getSparql(); |
166 | 166 | $result = $sparql->queryConceptScheme($defaultcs); |
167 | 167 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
168 | - if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
169 | - error_log('Caught exception: ' . $e->getMessage()); |
|
170 | - } |
|
171 | - return null; |
|
168 | + if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
169 | + error_log('Caught exception: ' . $e->getMessage()); |
|
170 | + } |
|
171 | + return null; |
|
172 | 172 | } |
173 | 173 | $conceptscheme = $result->resource($defaultcs); |
174 | 174 | $this->order = array("dc:title", "dc11:title", "skos:prefLabel", "rdfs:label", "dc:subject", "dc11:subject", "dc:description", "dc11:description", "dc:publisher", "dc11:publisher", "dc:creator", "dc11:creator", "dc:contributor", "dc:language", "dc11:language", "owl:versionInfo", "dc:source", "dc11:source"); |
@@ -238,9 +238,9 @@ discard block |
||
238 | 238 | try { |
239 | 239 | $conceptSchemes = $this->getSparql()->queryConceptSchemes($lang); |
240 | 240 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
241 | - if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
242 | - error_log('Caught exception: ' . $e->getMessage()); |
|
243 | - } |
|
241 | + if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
242 | + error_log('Caught exception: ' . $e->getMessage()); |
|
243 | + } |
|
244 | 244 | } |
245 | 245 | return $conceptSchemes; |
246 | 246 | } |
@@ -436,9 +436,9 @@ discard block |
||
436 | 436 | try { |
437 | 437 | $conceptInfo = $sparql->queryConceptInfo($uri, $this->config->getArrayClassURI(), array($this), $clang); |
438 | 438 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
439 | - if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
440 | - error_log('Caught exception: ' . $e->getMessage()); |
|
441 | - } |
|
439 | + if ($this->model->getConfig()->getLogCaughtExceptions()) { |
|
440 | + error_log('Caught exception: ' . $e->getMessage()); |
|
441 | + } |
|
442 | 442 | } |
443 | 443 | return $conceptInfo; |
444 | 444 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | return $lname; |
105 | 105 | } |
106 | 106 | // already a full URI |
107 | - return $this->getUriSpace() . $lname; |
|
107 | + return $this->getUriSpace().$lname; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | // query everything the endpoint knows about the ConceptScheme |
165 | 165 | $sparql = $this->getSparql(); |
166 | 166 | $result = $sparql->queryConceptScheme($defaultcs); |
167 | - } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
167 | + } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
168 | 168 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
169 | - error_log('Caught exception: ' . $e->getMessage()); |
|
169 | + error_log('Caught exception: '.$e->getMessage()); |
|
170 | 170 | } |
171 | 171 | return null; |
172 | 172 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | foreach ($conceptscheme->allLiterals($prop, null) as $val) { |
183 | 183 | $prop = (substr($prop, 0, 5) == 'dc11:') ? str_replace('dc11:', 'dc:', $prop) : $prop; |
184 | 184 | if ($val->getValue() instanceof DateTime) { |
185 | - $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang) . ' ' . Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang); |
|
185 | + $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang).' '.Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang); |
|
186 | 186 | } |
187 | 187 | $ret[$prop][] = $val; |
188 | 188 | } |
@@ -237,9 +237,9 @@ discard block |
||
237 | 237 | $conceptSchemes = null; |
238 | 238 | try { |
239 | 239 | $conceptSchemes = $this->getSparql()->queryConceptSchemes($lang); |
240 | - } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
240 | + } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
241 | 241 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
242 | - error_log('Caught exception: ' . $e->getMessage()); |
|
242 | + error_log('Caught exception: '.$e->getMessage()); |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 | return $conceptSchemes; |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | } |
311 | 311 | // don't know how to parse |
312 | 312 | $rev = $parts[2]; |
313 | - $datestr = $parts[3] . ' ' . $parts[4]; |
|
313 | + $datestr = $parts[3].' '.$parts[4]; |
|
314 | 314 | |
315 | 315 | return "$datestr (r$rev)"; |
316 | 316 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | * Counts the statistics of the vocabulary. |
320 | 320 | * @return array of the concept/group counts |
321 | 321 | */ |
322 | - public function getStatistics($lang = '', $array=null, $group=null) |
|
322 | + public function getStatistics($lang = '', $array = null, $group = null) |
|
323 | 323 | { |
324 | 324 | $sparql = $this->getSparql(); |
325 | 325 | // find the number of concepts |
@@ -435,9 +435,9 @@ discard block |
||
435 | 435 | $conceptInfo = null; |
436 | 436 | try { |
437 | 437 | $conceptInfo = $sparql->queryConceptInfo($uri, $this->config->getArrayClassURI(), array($this), $clang); |
438 | - } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
438 | + } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
439 | 439 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
440 | - error_log('Caught exception: ' . $e->getMessage()); |
|
440 | + error_log('Caught exception: '.$e->getMessage()); |
|
441 | 441 | } |
442 | 442 | } |
443 | 443 | return $conceptInfo; |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | return $this->getSparql()->queryChangeList($prop, $clang, $offset, $limit); |
648 | 648 | } |
649 | 649 | |
650 | - public function getTitle($lang=null) { |
|
650 | + public function getTitle($lang = null) { |
|
651 | 651 | return $this->config->getTitle($lang); |
652 | 652 | } |
653 | 653 |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | $exsparql = $exvoc->getSparql(); |
51 | 51 | $results = $exsparql->queryLabel($exuri, $lang); |
52 | 52 | return isset($results[$lang]) ? $results[$lang] : null; |
53 | - } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
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 | } |
@@ -72,9 +72,9 @@ discard block |
||
72 | 72 | $exsparql = $exvoc->getSparql(); |
73 | 73 | $results = $exsparql->queryNotation($exuri); |
74 | 74 | return isset($results) ? $results : null; |
75 | - } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
|
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 | } |