@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $label = $this->getLabel(); |
| 38 | 38 | $notation = $this->getNotation(); |
| 39 | - return ltrim($notation . ' ') . $label; |
|
| 39 | + return ltrim($notation.' ').$label; |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function getType() |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | public function getSortKey() |
| 59 | 59 | { |
| 60 | - return strtolower($this->getVocabName() . ": " . $this->getLabel()); |
|
| 60 | + return strtolower($this->getVocabName().": ".$this->getLabel()); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | private function queryLabel($lang = '', $queryExVocabs = true) |
@@ -186,25 +186,25 @@ discard block |
||
| 186 | 186 | 'from' => [ |
| 187 | 187 | 'memberSet' => [ |
| 188 | 188 | [ |
| 189 | - 'uri' => (string) $this->source->getUri(), |
|
| 189 | + 'uri' => (string)$this->source->getUri(), |
|
| 190 | 190 | ] |
| 191 | 191 | ] |
| 192 | 192 | ], |
| 193 | 193 | 'to' => [ |
| 194 | 194 | 'memberSet' => [ |
| 195 | 195 | [ |
| 196 | - 'uri' => (string) $this->getUri() |
|
| 196 | + 'uri' => (string)$this->getUri() |
|
| 197 | 197 | ] |
| 198 | 198 | ] |
| 199 | 199 | ], |
| 200 | 200 | // EXTRA |
| 201 | 201 | 'hrefLink' => $hrefLink, // link to resource as displayed in the UI |
| 202 | 202 | 'lang' => $propertyLang, // TBD: could it be part of the prefLabel? |
| 203 | - 'vocabName' => (string) $this->getVocabName(), // vocabulary as displayed in the UI |
|
| 203 | + 'vocabName' => (string)$this->getVocabName(), // vocabulary as displayed in the UI |
|
| 204 | 204 | 'typeLabel' => $this->model->getText($this->type), // a text used in the UI instead of, for example, skos:closeMatch |
| 205 | 205 | ]; |
| 206 | 206 | |
| 207 | - $helpprop = $this->type . "_help"; |
|
| 207 | + $helpprop = $this->type."_help"; |
|
| 208 | 208 | // see if we have a translation for the property help text |
| 209 | 209 | $help = $this->model->getText($helpprop); |
| 210 | 210 | if ($help != $helpprop) { |
@@ -214,20 +214,20 @@ discard block |
||
| 214 | 214 | $fromScheme = $this->vocab->getDefaultConceptScheme(); |
| 215 | 215 | if (isset($fromScheme)) { |
| 216 | 216 | $ret['fromScheme'] = [ |
| 217 | - 'uri' => (string) $fromScheme, |
|
| 217 | + 'uri' => (string)$fromScheme, |
|
| 218 | 218 | ]; |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | $exvocab = $this->getExvocab(); |
| 222 | 222 | if (isset($exvocab)) { |
| 223 | 223 | $ret['toScheme'] = [ |
| 224 | - 'uri' => (string) $exvocab->getDefaultConceptScheme(), |
|
| 224 | + 'uri' => (string)$exvocab->getDefaultConceptScheme(), |
|
| 225 | 225 | ]; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | $notation = $this->getNotation(); |
| 229 | 229 | if (isset($notation)) { |
| 230 | - $ret['to']['memberSet'][0]['notation'] = (string) $notation; |
|
| 230 | + $ret['to']['memberSet'][0]['notation'] = (string)$notation; |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | $label = $this->getLabel($lang, $queryExVocabs); |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | } |
| 10 | 10 | require_once '../vendor/autoload.php'; |
| 11 | 11 | } catch (Exception $e) { |
| 12 | - echo "Error: " . $e->getMessage(); |
|
| 12 | + echo "Error: ".$e->getMessage(); |
|
| 13 | 13 | return; |
| 14 | 14 | } |
| 15 | 15 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $model = new Model(); |
| 18 | 18 | } catch (Exception $e) { |
| 19 | 19 | header("HTTP/1.1 500 Internal Server Error"); |
| 20 | - echo "Error: " . $e->getMessage(); |
|
| 20 | + echo "Error: ".$e->getMessage(); |
|
| 21 | 21 | exit(1); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | // if language code missing, redirect to guessed language |
| 34 | 34 | // in any case, redirect to <lang>/ |
| 35 | 35 | $lang = sizeof($parts) == 2 && $parts[1] !== '' ? $parts[1] : $controller->guessLanguage($request); |
| 36 | - header("Location: " . $lang . "/"); |
|
| 36 | + header("Location: ".$lang."/"); |
|
| 37 | 37 | } else { |
| 38 | 38 | if (array_key_exists($parts[1], $model->getConfig()->getLanguages())) { // global pages |
| 39 | 39 | $request->setLang($parts[1]); |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | if (sizeof($parts) == 3) { // language code missing |
| 65 | 65 | $lang = $controller->guessLanguage($request); |
| 66 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/"; |
|
| 67 | - header("Location: " . $newurl); |
|
| 66 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/"; |
|
| 67 | + header("Location: ".$newurl); |
|
| 68 | 68 | } else { |
| 69 | 69 | if (array_key_exists($parts[2], $model->getConfig()->getLanguages())) { |
| 70 | 70 | $lang = $parts[2]; |
@@ -105,10 +105,10 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | } else { // language code missing, redirect to some language version |
| 107 | 107 | $lang = $controller->guessLanguage($request, $vocab); |
| 108 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/" . implode('/', array_slice($parts, 2)); |
|
| 108 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/".implode('/', array_slice($parts, 2)); |
|
| 109 | 109 | $qs = $request->getServerConstant('QUERY_STRING'); |
| 110 | 110 | if ($qs) { |
| 111 | - $newurl .= "?" . $qs; |
|
| 111 | + $newurl .= "?".$qs; |
|
| 112 | 112 | } |
| 113 | 113 | header("Location: $newurl"); |
| 114 | 114 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | "skos:related", "skos:historyNote", "skosmos:memberOf", |
| 31 | 31 | "skosmos:memberOfArray"); |
| 32 | 32 | |
| 33 | - public function __construct(Model $model, EasyRdf\Resource $resource, array $globalPlugins=array()) |
|
| 33 | + public function __construct(Model $model, EasyRdf\Resource $resource, array $globalPlugins = array()) |
|
| 34 | 34 | { |
| 35 | 35 | parent::__construct($model, $resource); |
| 36 | 36 | $this->globalPlugins = $globalPlugins; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $paramValue = $paramLiteral->getValue(); |
| 124 | 124 | $paramLang = $paramLiteral->getLang(); |
| 125 | 125 | if ($paramLang) { |
| 126 | - $paramName .= '_' . $paramLang; |
|
| 126 | + $paramName .= '_'.$paramLang; |
|
| 127 | 127 | } |
| 128 | 128 | $this->pluginParameters[$pluginName][$paramName] = $paramValue; |
| 129 | 129 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $labelProperty = $override->getResource('skosmos:property'); |
| 156 | 156 | $labelPropUri = $labelProperty->shorten(); |
| 157 | 157 | if (empty($this->labelOverrides[$labelPropUri])) { |
| 158 | - $this->labelOverrides[$labelPropUri] = array(); |
|
| 158 | + $this->labelOverrides[$labelPropUri] = array(); |
|
| 159 | 159 | } |
| 160 | 160 | $newOverrides = array(); |
| 161 | 161 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $langs = $this->getLanguages(); |
| 230 | 230 | $deflang = reset($langs); // picking the first one from the list with reset since the keys are not numeric |
| 231 | 231 | if (sizeof($langs) > 1) { |
| 232 | - trigger_error("Default language for vocabulary '" . $this->getShortName() . "' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
| 232 | + trigger_error("Default language for vocabulary '".$this->getShortName()."' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | return $deflang; |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | private $configModifiedTime = null; |
| 32 | 32 | |
| 33 | - public function __construct(Model $model, string $config_name='../../config.ttl') |
|
| 33 | + public function __construct(Model $model, string $config_name = '../../config.ttl') |
|
| 34 | 34 | { |
| 35 | 35 | $this->cache = new Cache(); |
| 36 | - $this->filePath = realpath(dirname(__FILE__) . "/" . $config_name); |
|
| 36 | + $this->filePath = realpath(dirname(__FILE__)."/".$config_name); |
|
| 37 | 37 | if (!file_exists($this->filePath)) { |
| 38 | 38 | throw new Exception('config.ttl file is missing, please provide one.'); |
| 39 | 39 | } |
@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | // use APC user cache to store parsed config.ttl configuration |
| 70 | 70 | if ($this->cache->isAvailable() && !is_null($this->configModifiedTime)) { |
| 71 | 71 | // @codeCoverageIgnoreStart |
| 72 | - $key = realpath($this->filePath) . ", " . $this->configModifiedTime; |
|
| 73 | - $nskey = "namespaces of " . $key; |
|
| 72 | + $key = realpath($this->filePath).", ".$this->configModifiedTime; |
|
| 73 | + $nskey = "namespaces of ".$key; |
|
| 74 | 74 | $this->graph = $this->cache->fetch($key); |
| 75 | 75 | $this->namespaces = $this->cache->fetch($nskey); |
| 76 | 76 | if ($this->graph === false || $this->namespaces === false) { // was not found in cache |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | public function getGlobalPlugins() |
| 320 | 320 | { |
| 321 | 321 | $globalPlugins = array(); |
| 322 | - $globalPluginsResource = $this->getResource()->getResource("skosmos:globalPlugins"); |
|
| 322 | + $globalPluginsResource = $this->getResource()->getResource("skosmos:globalPlugins"); |
|
| 323 | 323 | if ($globalPluginsResource) { |
| 324 | 324 | foreach ($globalPluginsResource as $resource) { |
| 325 | 325 | $globalPlugins[] = $resource->getValue(); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * Initializes the Model object |
| 31 | 31 | */ |
| 32 | - public function __construct(string $config_filename="../../config.ttl") |
|
| 32 | + public function __construct(string $config_filename = "../../config.ttl") |
|
| 33 | 33 | { |
| 34 | 34 | $this->resolver = new Resolver($this); |
| 35 | 35 | $this->globalConfig = new GlobalConfig($this, $config_filename); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $this->translator = new Translator($langcode); |
| 41 | 41 | } |
| 42 | 42 | $this->translator->addLoader('json', new JsonFileLoader()); |
| 43 | - $this->translator->addResource('json', __DIR__.'/../../resource/translations/messages.' . $langcode . '.json', $langcode); |
|
| 43 | + $this->translator->addResource('json', __DIR__.'/../../resource/translations/messages.'.$langcode.'.json', $langcode); |
|
| 44 | 44 | } |
| 45 | 45 | $this->initializeLogging(); |
| 46 | 46 | } |
@@ -274,11 +274,11 @@ discard block |
||
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | $vocabs = $params->getVocabs(); |
| 277 | - $showDeprecated=false; |
|
| 277 | + $showDeprecated = false; |
|
| 278 | 278 | if (sizeof($vocabs) === 1) { // search within vocabulary |
| 279 | 279 | $voc = $vocabs[0]; |
| 280 | 280 | $sparql = $voc->getSparql(); |
| 281 | - $showDeprecated=$voc->getConfig()->getShowDeprecated(); |
|
| 281 | + $showDeprecated = $voc->getConfig()->getShowDeprecated(); |
|
| 282 | 282 | } else { // multi-vocabulary or global search |
| 283 | 283 | $voc = null; |
| 284 | 284 | $sparql = $this->getDefaultSparql(); |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | public function getVocabularyCategories() |
| 440 | 440 | { |
| 441 | 441 | $cats = $this->globalConfig->getGraph()->allOfType('skos:Concept'); |
| 442 | - if(empty($cats)) { |
|
| 442 | + if (empty($cats)) { |
|
| 443 | 443 | return array(new VocabularyCategory($this, null)); |
| 444 | 444 | } |
| 445 | 445 | |
@@ -520,9 +520,9 @@ discard block |
||
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | // if there are multiple vocabularies and one is the preferred vocabulary, return it |
| 523 | - if($preferredVocabId != null) { |
|
| 523 | + if ($preferredVocabId != null) { |
|
| 524 | 524 | foreach ($vocabs as $vocab) { |
| 525 | - if($vocab->getId() == $preferredVocabId) { |
|
| 525 | + if ($vocab->getId() == $preferredVocabId) { |
|
| 526 | 526 | try { |
| 527 | 527 | // double check that a label exists in the preferred vocabulary |
| 528 | 528 | if ($vocab->getConceptLabel($uri, null) !== null) { |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | } |
| 534 | 534 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
| 535 | 535 | if ($this->getConfig()->getLogCaughtExceptions()) { |
| 536 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 536 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 537 | 537 | } |
| 538 | 538 | break; |
| 539 | 539 | } |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | } |
| 550 | 550 | } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) { |
| 551 | 551 | if ($this->getConfig()->getLogCaughtExceptions()) { |
| 552 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 552 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 553 | 553 | } |
| 554 | 554 | break; |
| 555 | 555 | } |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | // using apc cache for the resource if available |
| 623 | 623 | if ($this->globalConfig->getCache()->isAvailable()) { |
| 624 | 624 | // @codeCoverageIgnoreStart |
| 625 | - $key = 'fetch: ' . $uri; |
|
| 625 | + $key = 'fetch: '.$uri; |
|
| 626 | 626 | $resource = $this->globalConfig->getCache()->fetch($key); |
| 627 | 627 | if ($resource === null || $resource === false) { // was not found in cache, or previous request failed |
| 628 | 628 | $resource = $this->resolver->resolve($uri, $this->getConfig()->getHttpTimeout()); |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | */ |
| 644 | 644 | public function getSparqlImplementation($dialect, $endpoint, $graph) |
| 645 | 645 | { |
| 646 | - $classname = $dialect . "Sparql"; |
|
| 646 | + $classname = $dialect."Sparql"; |
|
| 647 | 647 | |
| 648 | 648 | return new $classname($endpoint, $graph, $this); |
| 649 | 649 | } |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // specify where to look for templates and cache |
| 40 | - $loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../view'); |
|
| 40 | + $loader = new \Twig\Loader\FilesystemLoader(__DIR__.'/../view'); |
|
| 41 | 41 | // initialize Twig environment |
| 42 | - $this->twig = new \Twig\Environment($loader, array('cache' => $tmpDir,'auto_reload' => true)); |
|
| 42 | + $this->twig = new \Twig\Environment($loader, array('cache' => $tmpDir, 'auto_reload' => true)); |
|
| 43 | 43 | // used for setting the base href for the relative urls |
| 44 | 44 | $this->twig->addGlobal("BaseHref", $this->getBaseHref()); |
| 45 | 45 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $this->twig->addExtension(new LinkUrlExtension($model)); |
| 54 | 54 | |
| 55 | 55 | // register a Twig filter for generating strings from language codes with CLDR |
| 56 | - $langFilter = new \Twig\TwigFilter('lang_name', function ($langcode, $lang) { |
|
| 56 | + $langFilter = new \Twig\TwigFilter('lang_name', function($langcode, $lang) { |
|
| 57 | 57 | return Language::getName($langcode, $lang); |
| 58 | 58 | }); |
| 59 | 59 | $this->twig->addFilter($langFilter); |
@@ -239,16 +239,16 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) |
| 241 | 241 | { |
| 242 | - $headers = "MIME-Version: 1.0" . "\r\n"; |
|
| 243 | - $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; |
|
| 242 | + $headers = "MIME-Version: 1.0"."\r\n"; |
|
| 243 | + $headers .= "Content-type: text/html; charset=UTF-8"."\r\n"; |
|
| 244 | 244 | if (!empty($toMail)) { |
| 245 | - $headers .= "Cc: " . $this->model->getConfig()->getFeedbackAddress() . "\r\n"; |
|
| 245 | + $headers .= "Cc: ".$this->model->getConfig()->getFeedbackAddress()."\r\n"; |
|
| 246 | 246 | } |
| 247 | 247 | if (!empty($fromEmail)) { |
| 248 | 248 | $headers .= "Reply-To: $fromName <$fromEmail>\r\n"; |
| 249 | 249 | } |
| 250 | 250 | $service = $this->model->getConfig()->getServiceName(); |
| 251 | - return $headers . "From: $fromName via $service <$sender>"; |
|
| 251 | + return $headers."From: $fromName via $service <$sender>"; |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | /** |
@@ -262,9 +262,9 @@ discard block |
||
| 262 | 262 | public function sendFeedback($request, $message, $messageSubject, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null) |
| 263 | 263 | { |
| 264 | 264 | $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); |
| 265 | - $messageSubject = "[" . $this->model->getConfig()->getServiceName() . "] " . $messageSubject; |
|
| 265 | + $messageSubject = "[".$this->model->getConfig()->getServiceName()."] ".$messageSubject; |
|
| 266 | 266 | if ($fromVocab !== null && $fromVocab !== '') { |
| 267 | - $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "<br />" . $message; |
|
| 267 | + $message = 'Feedback from vocab: '.strtoupper($fromVocab)."<br />".$message; |
|
| 268 | 268 | } |
| 269 | 269 | $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender(); |
| 270 | 270 | // determine the sender address of the message |
@@ -283,10 +283,10 @@ discard block |
||
| 283 | 283 | $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender); |
| 284 | 284 | $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; |
| 285 | 285 | // adding some information about the user for debugging purposes. |
| 286 | - $message = $message . "<br /><br /> Debugging information:" |
|
| 287 | - . "<br />Timestamp: " . date(DATE_RFC2822) |
|
| 288 | - . "<br />User agent: " . $request->getServerConstant('HTTP_USER_AGENT') |
|
| 289 | - . "<br />Referer: " . $request->getServerConstant('HTTP_REFERER'); |
|
| 286 | + $message = $message."<br /><br /> Debugging information:" |
|
| 287 | + . "<br />Timestamp: ".date(DATE_RFC2822) |
|
| 288 | + . "<br />User agent: ".$request->getServerConstant('HTTP_USER_AGENT') |
|
| 289 | + . "<br />Referer: ".$request->getServerConstant('HTTP_REFERER'); |
|
| 290 | 290 | |
| 291 | 291 | try { |
| 292 | 292 | mail($toAddress, $messageSubject, $message, $headers, $params); |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | header("HTTP/1.0 404 Not Found"); |
| 295 | 295 | $template = $this->twig->load('error.twig'); |
| 296 | 296 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 297 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 297 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | echo $template->render( |
@@ -341,13 +341,13 @@ discard block |
||
| 341 | 341 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : null; |
| 342 | 342 | $vocabObjects = array(); |
| 343 | 343 | if ($vocids) { |
| 344 | - foreach($vocids as $vocid) { |
|
| 344 | + foreach ($vocids as $vocid) { |
|
| 345 | 345 | try { |
| 346 | 346 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
| 347 | 347 | } catch (ValueError $e) { |
| 348 | 348 | // fail fast with an error page if the vocabulary cannot be found |
| 349 | 349 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 350 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 350 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 351 | 351 | } |
| 352 | 352 | header("HTTP/1.0 400 Bad Request"); |
| 353 | 353 | $this->invokeGenericErrorPage($request, $e->getMessage()); |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $errored = true; |
| 370 | 370 | header("HTTP/1.0 500 Internal Server Error"); |
| 371 | 371 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 372 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 372 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 373 | 373 | } |
| 374 | 374 | } |
| 375 | 375 | $vocabList = $this->model->getVocabularyList(); |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | 'search_count' => $counts, |
| 382 | 382 | 'languages' => $this->languages, |
| 383 | 383 | 'search_results' => $searchResults, |
| 384 | - 'rest' => $parameters->getOffset()>0, |
|
| 384 | + 'rest' => $parameters->getOffset() > 0, |
|
| 385 | 385 | 'global_search' => true, |
| 386 | 386 | 'search_failed' => $errored, |
| 387 | 387 | 'term' => $request->getQueryParamRaw('q'), |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | } catch (Exception $e) { |
| 410 | 410 | header("HTTP/1.0 500 Internal Server Error"); |
| 411 | 411 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 412 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 412 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | echo $template->render( |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | } catch (Exception $e) { |
| 435 | 435 | header("HTTP/1.0 404 Not Found"); |
| 436 | 436 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 437 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 437 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | echo $template->render( |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | 'vocab' => $vocab, |
| 454 | 454 | 'search_results' => $searchResults, |
| 455 | 455 | 'search_count' => $counts, |
| 456 | - 'rest' => $parameters->getOffset()>0, |
|
| 456 | + 'rest' => $parameters->getOffset() > 0, |
|
| 457 | 457 | 'limit_parent' => $parameters->getParentLimit(), |
| 458 | 458 | 'limit_type' => $request->getQueryParam('type') ? explode('+', $request->getQueryParam('type')) : null, |
| 459 | 459 | 'limit_group' => $parameters->getGroupLimit(), |
@@ -53,15 +53,15 @@ |
||
| 53 | 53 | |
| 54 | 54 | $localname = $vocab->getLocalName($uri); |
| 55 | 55 | if ($localname !== $uri && $localname === urlencode($localname)) { |
| 56 | - $paramstr = count($params) > 0 ? '?' . http_build_query($params) : ''; |
|
| 56 | + $paramstr = count($params) > 0 ? '?'.http_build_query($params) : ''; |
|
| 57 | 57 | if ($type && $type !== '' && $type !== 'vocab' && !($localname === '' && $type === 'page')) { |
| 58 | - return "$vocid/$lang/$type/$localname" . $paramstr; |
|
| 58 | + return "$vocid/$lang/$type/$localname".$paramstr; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - return "$vocid/$lang/$localname" . $paramstr; |
|
| 61 | + return "$vocid/$lang/$localname".$paramstr; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $params['uri'] = $uri; |
| 65 | - return "$vocid/$lang/$type/?" . http_build_query($params); |
|
| 65 | + return "$vocid/$lang/$type/?".http_build_query($params); |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -220,7 +220,7 @@ |
||
| 220 | 220 | { |
| 221 | 221 | if ($modifiedDate) { |
| 222 | 222 | $ifModifiedSince = $this->getIfModifiedSince(); |
| 223 | - $this->sendHeader("Last-Modified: " . $modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
| 223 | + $this->sendHeader("Last-Modified: ".$modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
| 224 | 224 | if ($ifModifiedSince !== null && $ifModifiedSince >= $modifiedDate) { |
| 225 | 225 | $this->sendHeader("HTTP/1.0 304 Not Modified"); |
| 226 | 226 | return true; |