@@ -44,7 +44,7 @@ |
||
44 | 44 | return Punic\Calendar::formatDate($val, 'short'); |
45 | 45 | } catch (Exception $e) { |
46 | 46 | trigger_error($e->getMessage(), E_USER_WARNING); |
47 | - return (string) $this->literal; |
|
47 | + return (string)$this->literal; |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | return $this->literal->getValue(); |
@@ -585,7 +585,7 @@ |
||
585 | 585 | |
586 | 586 | /** |
587 | 587 | * Generate a VALUES clause for limiting the targeted graphs. |
588 | - * @param array $vocabs array of Vocabulary objects to target |
|
588 | + * @param Vocabulary[] $vocabs array of Vocabulary objects to target |
|
589 | 589 | * @return string VALUES clause, or "" if not necessary to limit |
590 | 590 | */ |
591 | 591 | protected function formatValuesGraph($vocabs) { |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | foreach ($graphs as $graph) { |
634 | 634 | $conditions[] = "?graph=<$graph>"; |
635 | 635 | } |
636 | - return "FILTER (" . implode('||', $conditions) . ")"; |
|
636 | + return "FILTER (".implode('||', $conditions).")"; |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | /** |
@@ -643,16 +643,16 @@ discard block |
||
643 | 643 | * @return string sparql query clauses |
644 | 644 | */ |
645 | 645 | protected function formatLimitAndOffset($limit, $offset) { |
646 | - $limit = ($limit) ? 'LIMIT ' . $limit : ''; |
|
647 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
646 | + $limit = ($limit) ? 'LIMIT '.$limit : ''; |
|
647 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
648 | 648 | // eliminating whitespace and line changes when the conditions aren't needed. |
649 | 649 | $limitandoffset = ''; |
650 | 650 | if ($limit && $offset) { |
651 | - $limitandoffset = "\n" . $limit . "\n" . $offset; |
|
651 | + $limitandoffset = "\n".$limit."\n".$offset; |
|
652 | 652 | } elseif ($limit) { |
653 | - $limitandoffset = "\n" . $limit; |
|
653 | + $limitandoffset = "\n".$limit; |
|
654 | 654 | } elseif ($offset) { |
655 | - $limitandoffset = "\n" . $offset; |
|
655 | + $limitandoffset = "\n".$offset; |
|
656 | 656 | } |
657 | 657 | |
658 | 658 | return $limitandoffset; |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | } |
673 | 673 | } |
674 | 674 | |
675 | - return implode(' UNION ', $typePatterns);; |
|
675 | + return implode(' UNION ', $typePatterns); ; |
|
676 | 676 | } |
677 | 677 | |
678 | 678 | /** |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | // if search language and UI/display language differ, must also consider case where there is no prefLabel in |
799 | 799 | // the display language; in that case, should use the label with the same language as the matched label |
800 | 800 | $labelcondFallback = ($searchLang != $lang) ? |
801 | - "OPTIONAL { # in case previous OPTIONAL block gives no labels\n" . |
|
801 | + "OPTIONAL { # in case previous OPTIONAL block gives no labels\n". |
|
802 | 802 | "?s skos:prefLabel ?label . FILTER (LANGMATCHES(LANG(?label), LANG(?match))) }" : ""; |
803 | 803 | |
804 | 804 | /* |
@@ -850,15 +850,15 @@ discard block |
||
850 | 850 | |
851 | 851 | $schemecond = ''; |
852 | 852 | if (!empty($schemes)) { |
853 | - foreach($schemes as $scheme) { |
|
853 | + foreach ($schemes as $scheme) { |
|
854 | 854 | $schemecond .= "?s skos:inScheme <$scheme> . "; |
855 | 855 | } |
856 | 856 | } |
857 | 857 | |
858 | 858 | // extra conditions for parent and group, if specified |
859 | - $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <" . $params->getParentLimit() . "> ." : ""; |
|
860 | - $groupcond = ($params->getGroupLimit()) ? "<" . $params->getGroupLimit() . "> skos:member ?s ." : ""; |
|
861 | - $pgcond = $parentcond . $groupcond; |
|
859 | + $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <".$params->getParentLimit()."> ." : ""; |
|
860 | + $groupcond = ($params->getGroupLimit()) ? "<".$params->getGroupLimit()."> skos:member ?s ." : ""; |
|
861 | + $pgcond = $parentcond.$groupcond; |
|
862 | 862 | |
863 | 863 | $orderextra = $this->isDefaultEndpoint() ? $this->graph : ''; |
864 | 864 | |
@@ -933,9 +933,9 @@ discard block |
||
933 | 933 | $hit['type'][] = $this->shortenUri($typeuri); |
934 | 934 | } |
935 | 935 | |
936 | - if(!empty($fields)) { |
|
936 | + if (!empty($fields)) { |
|
937 | 937 | foreach ($fields as $prop) { |
938 | - $propname = $prop . 's'; |
|
938 | + $propname = $prop.'s'; |
|
939 | 939 | if (isset($row->$propname)) { |
940 | 940 | foreach (explode("\n", $row->$propname->getValue()) as $line) { |
941 | 941 | $rdata = str_getcsv($line, ',', '"', '"'); |
@@ -1394,7 +1394,7 @@ discard block |
||
1394 | 1394 | if (!isset($row->label) || $row->label->getLang() === $lang) { |
1395 | 1395 | $ret[$row->object->getUri()] = $val; |
1396 | 1396 | } elseif ($row->label->getLang() === $fallbacklang) { |
1397 | - $val['label'] .= ' (' . $row->label->getLang() . ')'; |
|
1397 | + $val['label'] .= ' ('.$row->label->getLang().')'; |
|
1398 | 1398 | $ret[$row->object->getUri()] = $val; |
1399 | 1399 | } |
1400 | 1400 | } |
@@ -1494,7 +1494,7 @@ discard block |
||
1494 | 1494 | if ($row->label->getLang() == $lang) { |
1495 | 1495 | $label = $row->label->getValue(); |
1496 | 1496 | } else { |
1497 | - $label = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
1497 | + $label = $row->label->getValue()." (".$row->label->getLang().")"; |
|
1498 | 1498 | } |
1499 | 1499 | |
1500 | 1500 | } |
@@ -1661,7 +1661,7 @@ discard block |
||
1661 | 1661 | if (isset($row->childlabel)) { |
1662 | 1662 | $label = $row->childlabel->getValue(); |
1663 | 1663 | if ($row->childlabel->getLang() !== $lang) { |
1664 | - $label .= " (" . $row->childlabel->getLang() . ")"; |
|
1664 | + $label .= " (".$row->childlabel->getLang().")"; |
|
1665 | 1665 | } |
1666 | 1666 | |
1667 | 1667 | } |
@@ -1683,7 +1683,7 @@ discard block |
||
1683 | 1683 | if (isset($row->label)) { |
1684 | 1684 | $preflabel = $row->label->getValue(); |
1685 | 1685 | if ($row->label->getLang() !== $lang) { |
1686 | - $preflabel .= ' (' . $row->label->getLang() . ')'; |
|
1686 | + $preflabel .= ' ('.$row->label->getLang().')'; |
|
1687 | 1687 | } |
1688 | 1688 | |
1689 | 1689 | $ret[$uri]['prefLabel'] = $preflabel; |
@@ -1846,7 +1846,7 @@ discard block |
||
1846 | 1846 | if ($row->label->getLang() == $lang) { |
1847 | 1847 | $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue(); |
1848 | 1848 | } else { |
1849 | - $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
1849 | + $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue()." (".$row->label->getLang().")"; |
|
1850 | 1850 | } |
1851 | 1851 | |
1852 | 1852 | } |
@@ -1887,7 +1887,7 @@ discard block |
||
1887 | 1887 | */ |
1888 | 1888 | private function generateChangeListQuery($lang, $offset, $prop) { |
1889 | 1889 | $gcl = $this->graphClause; |
1890 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
1890 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
1891 | 1891 | |
1892 | 1892 | $query = <<<EOQ |
1893 | 1893 | SELECT DISTINCT ?concept ?date ?label |
@@ -10,6 +10,9 @@ |
||
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)) { |
@@ -23,6 +23,9 @@ |
||
23 | 23 | } |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $name |
|
28 | + */ |
|
26 | 29 | private function getConstant($name, $default) |
27 | 30 | { |
28 | 31 | if (defined($name) && constant($name)) { |
@@ -6,10 +6,10 @@ discard block |
||
6 | 6 | class GlobalConfig { |
7 | 7 | private $languages; |
8 | 8 | |
9 | - public function __construct($config_name='/../config.inc') |
|
9 | + public function __construct($config_name = '/../config.inc') |
|
10 | 10 | { |
11 | 11 | try { |
12 | - $file_path = dirname(__FILE__) . $config_name; |
|
12 | + $file_path = dirname(__FILE__).$config_name; |
|
13 | 13 | if (!file_exists($file_path)) { |
14 | 14 | throw new Exception('config.inc file is missing, please provide one.'); |
15 | 15 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->languages = $LANGUAGES; |
19 | 19 | } |
20 | 20 | } catch (Exception $e) { |
21 | - echo "Error: " . $e->getMessage(); |
|
21 | + echo "Error: ".$e->getMessage(); |
|
22 | 22 | return; |
23 | 23 | } |
24 | 24 | } |
@@ -114,6 +114,9 @@ discard block |
||
114 | 114 | return $this->returnJson($ret); |
115 | 115 | } |
116 | 116 | |
117 | + /** |
|
118 | + * @param Request $request |
|
119 | + */ |
|
117 | 120 | private function constructSearchParameters($request) |
118 | 121 | { |
119 | 122 | $parameters = new ConceptSearchParameters($request, $this->model->getConfig(), true); |
@@ -129,6 +132,9 @@ discard block |
||
129 | 132 | return $parameters; |
130 | 133 | } |
131 | 134 | |
135 | + /** |
|
136 | + * @param Request $request |
|
137 | + */ |
|
132 | 138 | private function transformSearchResults($request, $results) |
133 | 139 | { |
134 | 140 | // before serializing to JSON, get rid of the Vocabulary object that came with each resource |
@@ -504,6 +510,9 @@ discard block |
||
504 | 510 | return $this->returnJson($ret); |
505 | 511 | } |
506 | 512 | |
513 | + /** |
|
514 | + * @param Request $request |
|
515 | + */ |
|
507 | 516 | private function redirectToVocabData($request) { |
508 | 517 | $urls = $request->getVocab()->getConfig()->getDataURLs(); |
509 | 518 | if (sizeof($urls) == 0) { |
@@ -519,6 +528,9 @@ discard block |
||
519 | 528 | header("Location: " . $urls[$format]); |
520 | 529 | } |
521 | 530 | |
531 | + /** |
|
532 | + * @param string $format |
|
533 | + */ |
|
522 | 534 | private function returnDataResults($results, $format) { |
523 | 535 | if ($format == 'application/ld+json' || $format == 'application/json') { |
524 | 536 | // further compact JSON-LD document using a context |
@@ -606,6 +618,12 @@ discard block |
||
606 | 618 | return $this->returnJson($ret); |
607 | 619 | } |
608 | 620 | |
621 | + /** |
|
622 | + * @param string $uri |
|
623 | + * @param string $lang |
|
624 | + * @param string $propname |
|
625 | + * @param string $propuri |
|
626 | + */ |
|
609 | 627 | private function transformPropertyResults($uri, $lang, $objects, $propname, $propuri) |
610 | 628 | { |
611 | 629 | foreach ($objects as $objuri => $vals) { |
@@ -620,6 +638,14 @@ discard block |
||
620 | 638 | return $ret; |
621 | 639 | } |
622 | 640 | |
641 | + /** |
|
642 | + * @param string $uri |
|
643 | + * @param string $lang |
|
644 | + * @param string $tpropname |
|
645 | + * @param string $tpropuri |
|
646 | + * @param string $dpropname |
|
647 | + * @param string $dpropuri |
|
648 | + */ |
|
623 | 649 | private function transformTransitivePropertyResults($uri, $lang, $objects, $tpropname, $tpropuri, $dpropname, $dpropuri) |
624 | 650 | { |
625 | 651 | $results = array(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | // wrap with JSONP callback if requested |
44 | 44 | if (filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_STRING)) { |
45 | 45 | header("Content-type: application/javascript; charset=utf-8"); |
46 | - echo filter_input(INPUT_GET, 'callback', FILTER_UNSAFE_RAW) . "(" . json_encode($data) . ");"; |
|
46 | + echo filter_input(INPUT_GET, 'callback', FILTER_UNSAFE_RAW)."(".json_encode($data).");"; |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | // convert to vocids array to support multi-vocabulary search |
123 | 123 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : array(); |
124 | 124 | $vocabObjects = array(); |
125 | - foreach($vocids as $vocid) { |
|
125 | + foreach ($vocids as $vocid) { |
|
126 | 126 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
127 | 127 | } |
128 | 128 | $parameters->setVocabularies($vocabObjects); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if ($request->getQueryParam('labellang')) { |
169 | 169 | $ret['@context']['@language'] = $request->getQueryParam('labellang'); |
170 | 170 | } elseif ($request->getQueryParam('lang')) { |
171 | - $ret['@context']['@language'] = $request->getQueryParam('lang');; |
|
171 | + $ret['@context']['@language'] = $request->getQueryParam('lang'); ; |
|
172 | 172 | } |
173 | 173 | return $ret; |
174 | 174 | } |
@@ -513,10 +513,10 @@ discard block |
||
513 | 513 | |
514 | 514 | $format = $this->negotiateFormat(array_keys($urls), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
515 | 515 | if (!$format) { |
516 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . implode(' ', array_keys($urls))); |
|
516 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".implode(' ', array_keys($urls))); |
|
517 | 517 | } |
518 | 518 | |
519 | - header("Location: " . $urls[$format]); |
|
519 | + header("Location: ".$urls[$format]); |
|
520 | 520 | } |
521 | 521 | |
522 | 522 | private function returnDataResults($results, $format) { |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | |
571 | 571 | $format = $this->negotiateFormat(explode(' ', self::SUPPORTED_FORMATS), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
572 | 572 | if (!$format) { |
573 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . self::SUPPORTED_FORMATS); |
|
573 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".self::SUPPORTED_FORMATS); |
|
574 | 574 | } |
575 | 575 | |
576 | 576 | $vocid = $vocab ? $vocab->getId() : null; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | } |
15 | 15 | require_once 'vendor/autoload.php'; |
16 | 16 | } catch (Exception $e) { |
17 | - echo "Error: " . $e->getMessage(); |
|
17 | + echo "Error: ".$e->getMessage(); |
|
18 | 18 | return; |
19 | 19 | } |
20 | 20 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | // if language code missing, redirect to guessed language |
33 | 33 | // in any case, redirect to <lang>/ |
34 | 34 | $lang = sizeof($parts) == 2 && $parts[1] !== '' ? $parts[1] : $controller->guessLanguage(); |
35 | - header("Location: " . $lang . "/"); |
|
35 | + header("Location: ".$lang."/"); |
|
36 | 36 | } else { |
37 | 37 | if (array_key_exists($parts[1], $config->getLanguages())) { // global pages |
38 | 38 | $request->setLang($parts[1]); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | if (sizeof($parts) == 3) { // language code missing |
63 | 63 | $lang = $controller->guessLanguage(); |
64 | - header("Location: " . $lang . "/"); |
|
64 | + header("Location: ".$lang."/"); |
|
65 | 65 | } else { |
66 | 66 | if (array_key_exists($parts[2], $config->getLanguages())) { |
67 | 67 | $lang = $parts[2]; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | } else { // language code missing, redirect to some language version |
104 | 104 | $lang = $controller->guessLanguage($vocab); |
105 | - $pattern = '|' . preg_quote("/$vocab/") . '|'; |
|
105 | + $pattern = '|'.preg_quote("/$vocab/").'|'; |
|
106 | 106 | $location = preg_replace($pattern, "/$vocab/$lang/", $request->getServerConstant('REQUEST_URI'), 1); |
107 | 107 | header("Location: $location"); |
108 | 108 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } elseif ($parts[1] == 'data') { |
38 | 38 | $controller->data($request); |
39 | 39 | } elseif (sizeof($parts) == 2) { |
40 | - header("Location: " . $parts[1] . "/"); |
|
40 | + header("Location: ".$parts[1]."/"); |
|
41 | 41 | } else { |
42 | 42 | $vocab = $parts[1]; |
43 | 43 | try { |
@@ -93,5 +93,5 @@ discard block |
||
93 | 93 | } |
94 | 94 | } catch (Exception $e) { |
95 | 95 | header("HTTP/1.0 500 Internal Server Error"); |
96 | - echo('ERROR: ' . $e->getMessage()); |
|
96 | + echo('ERROR: '.$e->getMessage()); |
|
97 | 97 | } |
@@ -118,12 +118,12 @@ discard block |
||
118 | 118 | // 3. label in any language |
119 | 119 | $label = $this->resource->label(); |
120 | 120 | // if the label lang code is a subset of the ui lang eg. en-GB |
121 | - if ($label !== null && strpos($label->getLang(), $this->getEnvLang() . '-') === 0) { |
|
121 | + if ($label !== null && strpos($label->getLang(), $this->getEnvLang().'-') === 0) { |
|
122 | 122 | return $label->getValue(); |
123 | 123 | } |
124 | 124 | |
125 | 125 | if ($label !== null) { |
126 | - return $label->getValue() . " (" . $label->getLang() . ")"; |
|
126 | + return $label->getValue()." (".$label->getLang().")"; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | // empty |
@@ -448,14 +448,14 @@ discard block |
||
448 | 448 | |
449 | 449 | // making a human readable string from the timestamps |
450 | 450 | if ($created != '') { |
451 | - $ret = gettext('skosmos:created') . ' ' . (Punic\Calendar::formatDate($created, 'short')); |
|
451 | + $ret = gettext('skosmos:created').' '.(Punic\Calendar::formatDate($created, 'short')); |
|
452 | 452 | } |
453 | 453 | |
454 | 454 | if ($modified != '') { |
455 | 455 | if ($created != '') { |
456 | - $ret .= ', ' . gettext('skosmos:modified') . ' ' . (Punic\Calendar::formatDate($modified, 'short')); |
|
456 | + $ret .= ', '.gettext('skosmos:modified').' '.(Punic\Calendar::formatDate($modified, 'short')); |
|
457 | 457 | } else { |
458 | - $ret .= ' ' . ucfirst(gettext('skosmos:modified')) . ' ' . (Punic\Calendar::formatDate($modified, 'short')); |
|
458 | + $ret .= ' '.ucfirst(gettext('skosmos:modified')).' '.(Punic\Calendar::formatDate($modified, 'short')); |
|
459 | 459 | } |
460 | 460 | |
461 | 461 | } |
@@ -463,12 +463,12 @@ discard block |
||
463 | 463 | trigger_error($e->getMessage(), E_USER_WARNING); |
464 | 464 | $ret = ''; |
465 | 465 | if ($this->resource->get('dc:modified')) { |
466 | - $modified = (string) $this->resource->get('dc:modified'); |
|
467 | - $ret = gettext('skosmos:modified') . ' ' . $modified; |
|
466 | + $modified = (string)$this->resource->get('dc:modified'); |
|
467 | + $ret = gettext('skosmos:modified').' '.$modified; |
|
468 | 468 | } |
469 | 469 | if ($this->resource->get('dc:created')) { |
470 | - $created .= (string) $this->resource->get('dc:created'); |
|
471 | - $ret .= ' ' . gettext('skosmos:created') . ' ' . $created; |
|
470 | + $created .= (string)$this->resource->get('dc:created'); |
|
471 | + $ret .= ' '.gettext('skosmos:created').' '.$created; |
|
472 | 472 | } |
473 | 473 | } |
474 | 474 | return $ret; |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | $labels = array(); |
556 | 556 | foreach ($this->resource->allLiterals('skos:prefLabel') as $lit) { |
557 | 557 | // filtering away subsets of the current language eg. en vs en-GB |
558 | - if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) { |
|
558 | + if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang().'-') !== 0) { |
|
559 | 559 | $langName = Punic\Language::getName($lit->getLang(), $this->getEnvLang()) !== $lit->getLang() ? Punic\Language::getName($lit->getLang(), $this->getEnvLang()) : gettext($lit->getLang()); |
560 | 560 | $labels[$langName][] = new ConceptPropertyValueLiteral($lit, 'skos:prefLabel'); |
561 | 561 | } |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | } |
564 | 564 | foreach ($this->resource->allLiterals('skos:altLabel') as $lit) { |
565 | 565 | // filtering away subsets of the current language eg. en vs en-GB |
566 | - if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) { |
|
566 | + if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang().'-') !== 0) { |
|
567 | 567 | $langName = Punic\Language::getName($lit->getLang(), $this->getEnvLang()) ? Punic\Language::getName($lit->getLang(), $this->getEnvLang()) : gettext($lit->getLang()); |
568 | 568 | $labels[$langName][] = new ConceptPropertyValueLiteral($lit, 'skos:altLabel'); |
569 | 569 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // 1. Ensure characters with special meaning in Lucene are escaped |
45 | 45 | $lucenemap = array(); |
46 | 46 | foreach (str_split($this->LUCENE_ESCAPE_CHARS) as $char) { |
47 | - $lucenemap[$char] = '\\' . $char; // escape with a backslash |
|
47 | + $lucenemap[$char] = '\\'.$char; // escape with a backslash |
|
48 | 48 | } |
49 | 49 | $term = strtr($term, $lucenemap); |
50 | 50 | |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | |
103 | 103 | # make text query clause |
104 | 104 | $lcletter = mb_strtolower($letter, 'UTF-8'); // convert to lower case, UTF-8 safe |
105 | - $textcond_pref = $this->createTextQueryCondition($letter . '*', 'skos:prefLabel', $lang); |
|
106 | - $textcond_alt = $this->createTextQueryCondition($letter . '*', 'skos:altLabel', $lang); |
|
105 | + $textcond_pref = $this->createTextQueryCondition($letter.'*', 'skos:prefLabel', $lang); |
|
106 | + $textcond_alt = $this->createTextQueryCondition($letter.'*', 'skos:altLabel', $lang); |
|
107 | 107 | |
108 | 108 | $query = <<<EOQ |
109 | 109 | SELECT DISTINCT ?s ?label ?alabel |