@@ -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 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | // if language code missing, redirect to guessed language |
| 28 | 28 | // in any case, redirect to <lang>/ |
| 29 | 29 | $lang = sizeof($parts) == 2 && $parts[1] !== '' ? $parts[1] : $controller->guessLanguage($request); |
| 30 | - header("Location: " . $lang . "/"); |
|
| 30 | + header("Location: ".$lang."/"); |
|
| 31 | 31 | } else { |
| 32 | 32 | if (array_key_exists($parts[1], $config->getLanguages())) { // global pages |
| 33 | 33 | $request->setLang($parts[1]); |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | if (sizeof($parts) == 3) { // language code missing |
| 59 | 59 | $lang = $controller->guessLanguage($request); |
| 60 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/"; |
|
| 61 | - header("Location: " . $newurl); |
|
| 60 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/"; |
|
| 61 | + header("Location: ".$newurl); |
|
| 62 | 62 | } else { |
| 63 | 63 | if (array_key_exists($parts[2], $config->getLanguages())) { |
| 64 | 64 | $lang = $parts[2]; |
@@ -99,10 +99,10 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | } else { // language code missing, redirect to some language version |
| 101 | 101 | $lang = $controller->guessLanguage($request, $vocab); |
| 102 | - $newurl = $controller->getBaseHref() . $vocab . "/" . $lang . "/" . implode('/', array_slice($parts, 2)); |
|
| 102 | + $newurl = $controller->getBaseHref().$vocab."/".$lang."/".implode('/', array_slice($parts, 2)); |
|
| 103 | 103 | $qs = $request->getServerConstant('QUERY_STRING'); |
| 104 | 104 | if ($qs) { |
| 105 | - $newurl .= "?" . $qs; |
|
| 105 | + $newurl .= "?".$qs; |
|
| 106 | 106 | } |
| 107 | 107 | header("Location: $newurl"); |
| 108 | 108 | } |
@@ -32,9 +32,9 @@ |
||
| 32 | 32 | { |
| 33 | 33 | // Encrypt the current time |
| 34 | 34 | $honey_time_encrypted = $this->getEncryptedTime(); |
| 35 | - return '<div id="' . $honey_name . '_wrap" style="display:none;">' . "\r\n" . |
|
| 36 | - '<input name="' . $honey_name . '" type="text" value="" id="' . $honey_name . '"/>' . "\r\n" . |
|
| 37 | - '<input name="' . $honey_time . '" type="text" value="' . $honey_time_encrypted . '"/>' . "\r\n" . |
|
| 35 | + return '<div id="'.$honey_name.'_wrap" style="display:none;">'."\r\n". |
|
| 36 | + '<input name="'.$honey_name.'" type="text" value="" id="'.$honey_name.'"/>'."\r\n". |
|
| 37 | + '<input name="'.$honey_time.'" type="text" value="'.$honey_time_encrypted.'"/>'."\r\n". |
|
| 38 | 38 | '</div>'; |
| 39 | 39 | } |
| 40 | 40 | /** |
@@ -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_Filesystem(__DIR__ . '/../view'); |
|
| 40 | + $loader = new Twig_Loader_Filesystem(__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 | // setting the service name string from the config.ttl |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->twig->addFilter(new Twig_SimpleFilter('link_url', array($this, 'linkUrlFilter'))); |
| 62 | 62 | |
| 63 | 63 | // register a Twig filter for generating strings from language codes with CLDR |
| 64 | - $langFilter = new Twig_SimpleFilter('lang_name', function ($langcode, $lang) { |
|
| 64 | + $langFilter = new Twig_SimpleFilter('lang_name', function($langcode, $lang) { |
|
| 65 | 65 | return Language::getName($langcode, $lang); |
| 66 | 66 | }); |
| 67 | 67 | $this->twig->addFilter($langFilter); |
@@ -247,16 +247,16 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) |
| 249 | 249 | { |
| 250 | - $headers = "MIME-Version: 1.0" . "\r\n"; |
|
| 251 | - $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; |
|
| 250 | + $headers = "MIME-Version: 1.0"."\r\n"; |
|
| 251 | + $headers .= "Content-type: text/html; charset=UTF-8"."\r\n"; |
|
| 252 | 252 | if (!empty($toMail)) { |
| 253 | - $headers .= "Cc: " . $this->model->getConfig()->getFeedbackAddress() . "\r\n"; |
|
| 253 | + $headers .= "Cc: ".$this->model->getConfig()->getFeedbackAddress()."\r\n"; |
|
| 254 | 254 | } |
| 255 | 255 | if (!empty($fromEmail)) { |
| 256 | 256 | $headers .= "Reply-To: $fromName <$fromEmail>\r\n"; |
| 257 | 257 | } |
| 258 | 258 | $service = $this->model->getConfig()->getServiceName(); |
| 259 | - return $headers . "From: $fromName via $service <$sender>"; |
|
| 259 | + return $headers."From: $fromName via $service <$sender>"; |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | /** |
@@ -270,9 +270,9 @@ discard block |
||
| 270 | 270 | public function sendFeedback($request, $message, $messageSubject, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null) |
| 271 | 271 | { |
| 272 | 272 | $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); |
| 273 | - $messageSubject = "[" . $this->model->getConfig()->getServiceName() . "] " . $messageSubject; |
|
| 273 | + $messageSubject = "[".$this->model->getConfig()->getServiceName()."] ".$messageSubject; |
|
| 274 | 274 | if ($fromVocab !== null && $fromVocab !== '') { |
| 275 | - $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "<br />" . $message; |
|
| 275 | + $message = 'Feedback from vocab: '.strtoupper($fromVocab)."<br />".$message; |
|
| 276 | 276 | } |
| 277 | 277 | $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender(); |
| 278 | 278 | // determine the sender address of the message |
@@ -291,10 +291,10 @@ discard block |
||
| 291 | 291 | $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender); |
| 292 | 292 | $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; |
| 293 | 293 | // adding some information about the user for debugging purposes. |
| 294 | - $message = $message . "<br /><br /> Debugging information:" |
|
| 295 | - . "<br />Timestamp: " . date(DATE_RFC2822) |
|
| 296 | - . "<br />User agent: " . $request->getServerConstant('HTTP_USER_AGENT') |
|
| 297 | - . "<br />Referer: " . $request->getServerConstant('HTTP_REFERER'); |
|
| 294 | + $message = $message."<br /><br /> Debugging information:" |
|
| 295 | + . "<br />Timestamp: ".date(DATE_RFC2822) |
|
| 296 | + . "<br />User agent: ".$request->getServerConstant('HTTP_USER_AGENT') |
|
| 297 | + . "<br />Referer: ".$request->getServerConstant('HTTP_REFERER'); |
|
| 298 | 298 | |
| 299 | 299 | try { |
| 300 | 300 | mail($toAddress, $messageSubject, $message, $headers, $params); |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | header("HTTP/1.0 404 Not Found"); |
| 303 | 303 | $template = $this->twig->loadTemplate('error.twig'); |
| 304 | 304 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 305 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 305 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | echo $template->render( |
@@ -349,13 +349,13 @@ discard block |
||
| 349 | 349 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : null; |
| 350 | 350 | $vocabObjects = array(); |
| 351 | 351 | if ($vocids) { |
| 352 | - foreach($vocids as $vocid) { |
|
| 352 | + foreach ($vocids as $vocid) { |
|
| 353 | 353 | try { |
| 354 | 354 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
| 355 | 355 | } catch (ValueError $e) { |
| 356 | 356 | // fail fast with an error page if the vocabulary cannot be found |
| 357 | 357 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 358 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 358 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 359 | 359 | } |
| 360 | 360 | header("HTTP/1.0 400 Bad Request"); |
| 361 | 361 | $this->invokeGenericErrorPage($request, $e->getMessage()); |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | $errored = true; |
| 378 | 378 | header("HTTP/1.0 500 Internal Server Error"); |
| 379 | 379 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 380 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 380 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 381 | 381 | } |
| 382 | 382 | } |
| 383 | 383 | $vocabList = $this->model->getVocabularyList(); |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | 'search_count' => $counts, |
| 390 | 390 | 'languages' => $this->languages, |
| 391 | 391 | 'search_results' => $searchResults, |
| 392 | - 'rest' => $parameters->getOffset()>0, |
|
| 392 | + 'rest' => $parameters->getOffset() > 0, |
|
| 393 | 393 | 'global_search' => true, |
| 394 | 394 | 'search_failed' => $errored, |
| 395 | 395 | 'term' => $request->getQueryParamRaw('q'), |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | } catch (Exception $e) { |
| 418 | 418 | header("HTTP/1.0 500 Internal Server Error"); |
| 419 | 419 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 420 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 420 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | echo $template->render( |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | } catch (Exception $e) { |
| 443 | 443 | header("HTTP/1.0 404 Not Found"); |
| 444 | 444 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
| 445 | - error_log('Caught exception: ' . $e->getMessage()); |
|
| 445 | + error_log('Caught exception: '.$e->getMessage()); |
|
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | echo $template->render( |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | 'vocab' => $vocab, |
| 462 | 462 | 'search_results' => $searchResults, |
| 463 | 463 | 'search_count' => $counts, |
| 464 | - 'rest' => $parameters->getOffset()>0, |
|
| 464 | + 'rest' => $parameters->getOffset() > 0, |
|
| 465 | 465 | 'limit_parent' => $parameters->getParentLimit(), |
| 466 | 466 | 'limit_type' => $request->getQueryParam('type') ? explode('+', $request->getQueryParam('type')) : null, |
| 467 | 467 | 'limit_group' => $parameters->getGroupLimit(), |
@@ -156,18 +156,18 @@ discard block |
||
| 156 | 156 | $localname = $vocab->getLocalName($uri); |
| 157 | 157 | if ($localname !== $uri && $localname === urlencode($localname)) { |
| 158 | 158 | // check that the prefix stripping worked, and there are no problematic chars in localname |
| 159 | - $paramstr = count($params) > 0 ? '?' . http_build_query($params) : ''; |
|
| 159 | + $paramstr = count($params) > 0 ? '?'.http_build_query($params) : ''; |
|
| 160 | 160 | if ($type && $type !== '' && $type !== 'vocab' && !($localname === '' && $type === 'page')) { |
| 161 | - return "$vocid/$lang/$type/$localname" . $paramstr; |
|
| 161 | + return "$vocid/$lang/$type/$localname".$paramstr; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | - return "$vocid/$lang/$localname" . $paramstr; |
|
| 164 | + return "$vocid/$lang/$localname".$paramstr; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | // case 2: URI outside vocabulary namespace, or has problematic chars |
| 168 | 168 | // pass the full URI as parameter instead |
| 169 | 169 | $params['uri'] = $uri; |
| 170 | - return "$vocid/$lang/$type/?" . http_build_query($params); |
|
| 170 | + return "$vocid/$lang/$type/?".http_build_query($params); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | { |
| 294 | 294 | if ($modifiedDate) { |
| 295 | 295 | $ifModifiedSince = $this->getIfModifiedSince(); |
| 296 | - $this->sendHeader("Last-Modified: " . $modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
| 296 | + $this->sendHeader("Last-Modified: ".$modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
| 297 | 297 | if ($ifModifiedSince !== null && $ifModifiedSince >= $modifiedDate) { |
| 298 | 298 | $this->sendHeader("HTTP/1.0 304 Not Modified"); |
| 299 | 299 | return true; |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $baseurl = $this->getBaseHref(); |
| 17 | 17 | $vocid = $vocab->getId(); |
| 18 | 18 | $query = http_build_query(array('uri'=>$uri, 'format'=>$targetFormat)); |
| 19 | - $url = $baseurl . "rest/v1/$vocid/data?$query"; |
|
| 19 | + $url = $baseurl."rest/v1/$vocid/data?$query"; |
|
| 20 | 20 | $this->redirect303($url); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -27,16 +27,16 @@ discard block |
||
| 27 | 27 | $localname = $vocab->getLocalName($uri); |
| 28 | 28 | |
| 29 | 29 | if (!$localname) { |
| 30 | - $url = $baseurl . "$vocid/"; |
|
| 30 | + $url = $baseurl."$vocid/"; |
|
| 31 | 31 | } else { |
| 32 | 32 | |
| 33 | 33 | if ($localname !== $uri && $localname === urlencode($localname)) { |
| 34 | 34 | // the URI can be shortened |
| 35 | - $url = $baseurl . "$vocid/page/$localname"; |
|
| 35 | + $url = $baseurl."$vocid/page/$localname"; |
|
| 36 | 36 | } else { |
| 37 | 37 | // must use full URI |
| 38 | 38 | $query = http_build_query(array('uri'=>$uri)); |
| 39 | - $url = $baseurl . "$vocid/page/?" . $query; |
|
| 39 | + $url = $baseurl."$vocid/page/?".$query; |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | $this->redirect303($url); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | // guess vocabulary based on URI |
| 59 | 59 | $vocab = $this->model->guessVocabularyFromURI($request->getUri()); |
| 60 | 60 | if ($vocab === null) { |
| 61 | - return $this->returnError('404', 'Not Found', 'Unrecognized URI ' . $request->getUri()); |
|
| 61 | + return $this->returnError('404', 'Not Found', 'Unrecognized URI '.$request->getUri()); |
|
| 62 | 62 | } |
| 63 | 63 | $request->setVocab($vocab->getId()); |
| 64 | 64 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | // wrap with JSONP callback if requested |
| 26 | 26 | if (filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS)) { |
| 27 | 27 | header("Content-type: application/javascript; charset=utf-8"); |
| 28 | - echo filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS) . "(" . json_encode($data) . ");"; |
|
| 28 | + echo filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS)."(".json_encode($data).");"; |
|
| 29 | 29 | return; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | 'vocabularies' => 'onki:hasVocabulary', |
| 89 | 89 | 'id' => 'onki:vocabularyIdentifier', |
| 90 | 90 | 'uri' => '@id', |
| 91 | - '@base' => $this->getBaseHref() . "rest/v1/vocabularies", |
|
| 91 | + '@base' => $this->getBaseHref()."rest/v1/vocabularies", |
|
| 92 | 92 | ), |
| 93 | 93 | 'uri' => '', |
| 94 | 94 | 'vocabularies' => $results, |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | // convert to vocids array to support multi-vocabulary search |
| 106 | 106 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : array(); |
| 107 | 107 | $vocabObjects = array(); |
| 108 | - foreach($vocids as $vocid) { |
|
| 108 | + foreach ($vocids as $vocid) { |
|
| 109 | 109 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
| 110 | 110 | } |
| 111 | 111 | $parameters->setVocabularies($vocabObjects); |
@@ -136,12 +136,12 @@ discard block |
||
| 136 | 136 | foreach ($parameters->getAdditionalFields() as $field) { |
| 137 | 137 | |
| 138 | 138 | // Quick-and-dirty compactification |
| 139 | - $context[$field] = 'skos:' . $field; |
|
| 139 | + $context[$field] = 'skos:'.$field; |
|
| 140 | 140 | foreach ($results as &$result) { |
| 141 | 141 | foreach ($result as $k => $v) { |
| 142 | - if ($k == 'skos:' . $field) { |
|
| 142 | + if ($k == 'skos:'.$field) { |
|
| 143 | 143 | $result[$field] = $v; |
| 144 | - unset($result['skos:' . $field]); |
|
| 144 | + unset($result['skos:'.$field]); |
|
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | 'prefLabel' => 'skos:prefLabel', |
| 233 | 233 | 'title' => 'dct:title', |
| 234 | 234 | '@language' => $request->getLang(), |
| 235 | - '@base' => $this->getBaseHref() . "rest/v1/" . $vocab->getId() . "/", |
|
| 235 | + '@base' => $this->getBaseHref()."rest/v1/".$vocab->getId()."/", |
|
| 236 | 236 | ), |
| 237 | 237 | 'uri' => '', |
| 238 | 238 | 'id' => $vocab->getId(), |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | 'subTypes' => array('@id' => 'void:class', '@type' => '@id'), |
| 288 | 288 | 'count' => 'void:entities', |
| 289 | 289 | '@language' => $request->getLang(), |
| 290 | - '@base' => $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/", |
|
| 290 | + '@base' => $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/", |
|
| 291 | 291 | ), |
| 292 | 292 | 'uri' => '', |
| 293 | 293 | 'id' => $request->getVocab()->getId(), |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | 'language' => 'void-ext:language', |
| 370 | 370 | 'properties' => 'void:propertyPartition', |
| 371 | 371 | 'labels' => 'void:triples', |
| 372 | - '@base' => $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/", |
|
| 372 | + '@base' => $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/", |
|
| 373 | 373 | ), |
| 374 | 374 | 'uri' => '', |
| 375 | 375 | 'id' => $request->getVocab()->getId(), |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | $types[] = $type; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | - $base = $request->getVocab() ? $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/" : $this->getBaseHref() . "rest/v1/"; |
|
| 413 | + $base = $request->getVocab() ? $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/" : $this->getBaseHref()."rest/v1/"; |
|
| 414 | 414 | |
| 415 | 415 | $ret = array_merge_recursive( |
| 416 | 416 | $this->context, |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | if ($lang === null) { |
| 458 | 458 | // case 1A: exact match on preferred label in any language |
| 459 | 459 | foreach ($results as $res) { |
| 460 | - if (isset($res['matchedPrefLabel']) && $res['matchedPrefLabel'] == $label) { |
|
| 460 | + if (isset($res['matchedPrefLabel']) && $res['matchedPrefLabel'] == $label) { |
|
| 461 | 461 | $res['prefLabel'] = $res['matchedPrefLabel']; |
| 462 | 462 | unset($res['matchedPrefLabel']); |
| 463 | 463 | $hits[] = $res; |
@@ -592,19 +592,19 @@ discard block |
||
| 592 | 592 | |
| 593 | 593 | $format = $this->negotiateFormat(array_keys($urls), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
| 594 | 594 | if (!$format) { |
| 595 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . implode(' ', array_keys($urls))); |
|
| 595 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".implode(' ', array_keys($urls))); |
|
| 596 | 596 | } |
| 597 | 597 | if (is_array($urls[$format])) { |
| 598 | 598 | $arr = $urls[$format]; |
| 599 | 599 | $dataLang = $request->getLang(); |
| 600 | 600 | if (isset($arr[$dataLang])) { |
| 601 | - header("Location: " . $arr[$dataLang]); |
|
| 601 | + header("Location: ".$arr[$dataLang]); |
|
| 602 | 602 | } else { |
| 603 | 603 | $vocid = $request->getVocab()->getId(); |
| 604 | 604 | return $this->returnError('404', 'Not Found', "No download source URL known for vocabulary $vocid in language $dataLang"); |
| 605 | 605 | } |
| 606 | 606 | } else { |
| 607 | - header("Location: " . $urls[$format]); |
|
| 607 | + header("Location: ".$urls[$format]); |
|
| 608 | 608 | } |
| 609 | 609 | } |
| 610 | 610 | |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | |
| 669 | 669 | $format = $this->negotiateFormat(explode(' ', self::SUPPORTED_FORMATS), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
| 670 | 670 | if (!$format) { |
| 671 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . self::SUPPORTED_FORMATS); |
|
| 671 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".self::SUPPORTED_FORMATS); |
|
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | $vocid = $vocab ? $vocab->getId() : null; |
@@ -961,7 +961,7 @@ discard block |
||
| 961 | 961 | } |
| 962 | 962 | } |
| 963 | 963 | // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs) |
| 964 | - if (! isset($results[$uri]['top'])) { |
|
| 964 | + if (!isset($results[$uri]['top'])) { |
|
| 965 | 965 | $results[$uri]['top'] = $results[$uri]['tops'][0]; |
| 966 | 966 | } |
| 967 | 967 | } else { |
@@ -1147,7 +1147,7 @@ discard block |
||
| 1147 | 1147 | $changeList = $request->getVocab()->getChangeList($prop, $request->getLang(), $offset, $limit); |
| 1148 | 1148 | |
| 1149 | 1149 | $simpleChangeList = array(); |
| 1150 | - foreach($changeList as $conceptInfo) { |
|
| 1150 | + foreach ($changeList as $conceptInfo) { |
|
| 1151 | 1151 | if (array_key_exists('date', $conceptInfo)) { |
| 1152 | 1152 | $concept = array( |
| 1153 | 1153 | 'uri' => $conceptInfo['uri'], |
@@ -1164,10 +1164,10 @@ discard block |
||
| 1164 | 1164 | } |
| 1165 | 1165 | return $this->returnJson(array_merge_recursive( |
| 1166 | 1166 | $this->context, |
| 1167 | - array('@context' => array( '@language' => $request->getLang(), |
|
| 1167 | + array('@context' => array('@language' => $request->getLang(), |
|
| 1168 | 1168 | 'prefLabel' => 'skos:prefLabel', |
| 1169 | 1169 | 'xsd' => 'http://www.w3.org/2001/XMLSchema#', |
| 1170 | - 'date' => array( '@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime') ) |
|
| 1170 | + 'date' => array('@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime')) |
|
| 1171 | 1171 | ), |
| 1172 | 1172 | array('changeList' => $simpleChangeList) |
| 1173 | 1173 | )); |
@@ -23,5 +23,5 @@ |
||
| 23 | 23 | |
| 24 | 24 | } catch (Exception $e) { |
| 25 | 25 | header("HTTP/1.0 500 Internal Server Error"); |
| 26 | - echo('ERROR: ' . $e->getMessage()); |
|
| 26 | + echo('ERROR: '.$e->getMessage()); |
|
| 27 | 27 | } |