@@ -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 | } |
@@ -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 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | if ($this->rest) { |
76 | 76 | return $term; |
77 | 77 | } |
78 | - return strpos($term, "*") === false ? $term . "*" : $term; // default to prefix search |
|
78 | + return strpos($term, "*") === false ? $term."*" : $term; // default to prefix search |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function getContentLang() |
@@ -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 | /** |
@@ -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 | } |
@@ -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 | } |
@@ -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; |