@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function getDescription() |
81 | 81 | { |
82 | - $helpprop = $this->prop . "_help"; |
|
82 | + $helpprop = $this->prop."_help"; |
|
83 | 83 | |
84 | 84 | // see if we have a translation with the help text |
85 | 85 | $help = $this->model->getText($helpprop); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | public function addValue($value) |
112 | 112 | { |
113 | - $this->values[ltrim($value->getNotation() . ' ') . $value->getLabel(allowExternal: false) . rtrim(' ' . $value->getUri())] = $value; |
|
113 | + $this->values[ltrim($value->getNotation().' ').$value->getLabel(allowExternal: false).rtrim(' '.$value->getUri())] = $value; |
|
114 | 114 | $this->is_sorted = false; |
115 | 115 | } |
116 | 116 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | # Note that getLabel() returns URIs in case of no label and may return a prefixed value which affects sorting |
121 | 121 | if (!empty($this->values)) { |
122 | 122 | if ($this->sort_by_notation) { |
123 | - uasort($this->values, function ($a, $b) { |
|
123 | + uasort($this->values, function($a, $b) { |
|
124 | 124 | $anot = $a->getNotation(); |
125 | 125 | $bnot = $b->getNotation(); |
126 | 126 | if ($anot == null) { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | } |
142 | 142 | }); |
143 | 143 | } else { |
144 | - uasort($this->values, function ($a, $b) { |
|
144 | + uasort($this->values, function($a, $b) { |
|
145 | 145 | // assume that sort keys are unique |
146 | 146 | return strcoll($a->getSortKey(), $b->getSortKey()); |
147 | 147 | }); |
@@ -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() |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | public function getLabel($lang = '', $allowExternal = true) |
48 | 48 | { |
49 | - $key = $lang . "/" . ($allowExternal ? "true" : "false"); |
|
49 | + $key = $lang."/".($allowExternal ? "true" : "false"); |
|
50 | 50 | if (isset($this->labelcache[$key])) { |
51 | 51 | return $this->labelcache[$key]; |
52 | 52 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | public function getSortKey() |
60 | 60 | { |
61 | - return strtolower($this->getVocabName() . ": " . $this->getLabel()); |
|
61 | + return strtolower($this->getVocabName().": ".$this->getLabel()); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | private function queryLabel($lang = '', $allowExternal = true) |
@@ -187,25 +187,25 @@ discard block |
||
187 | 187 | 'from' => [ |
188 | 188 | 'memberSet' => [ |
189 | 189 | [ |
190 | - 'uri' => (string) $this->source->getUri(), |
|
190 | + 'uri' => (string)$this->source->getUri(), |
|
191 | 191 | ] |
192 | 192 | ] |
193 | 193 | ], |
194 | 194 | 'to' => [ |
195 | 195 | 'memberSet' => [ |
196 | 196 | [ |
197 | - 'uri' => (string) $this->getUri() |
|
197 | + 'uri' => (string)$this->getUri() |
|
198 | 198 | ] |
199 | 199 | ] |
200 | 200 | ], |
201 | 201 | // EXTRA |
202 | 202 | 'hrefLink' => $hrefLink, // link to resource as displayed in the UI |
203 | 203 | 'lang' => $propertyLang, // TBD: could it be part of the prefLabel? |
204 | - 'vocabName' => (string) $this->getVocabName(), // vocabulary as displayed in the UI |
|
204 | + 'vocabName' => (string)$this->getVocabName(), // vocabulary as displayed in the UI |
|
205 | 205 | 'typeLabel' => $this->model->getText($this->type), // a text used in the UI instead of, for example, skos:closeMatch |
206 | 206 | ]; |
207 | 207 | |
208 | - $helpprop = $this->type . "_help"; |
|
208 | + $helpprop = $this->type."_help"; |
|
209 | 209 | // see if we have a translation for the property help text |
210 | 210 | $help = $this->model->getText($helpprop); |
211 | 211 | if ($help != $helpprop) { |
@@ -215,20 +215,20 @@ discard block |
||
215 | 215 | $fromScheme = $this->vocab->getDefaultConceptScheme(); |
216 | 216 | if (isset($fromScheme)) { |
217 | 217 | $ret['fromScheme'] = [ |
218 | - 'uri' => (string) $fromScheme, |
|
218 | + 'uri' => (string)$fromScheme, |
|
219 | 219 | ]; |
220 | 220 | } |
221 | 221 | |
222 | 222 | $exvocab = $this->getExvocab(); |
223 | 223 | if (isset($exvocab)) { |
224 | 224 | $ret['toScheme'] = [ |
225 | - 'uri' => (string) $exvocab->getDefaultConceptScheme(), |
|
225 | + 'uri' => (string)$exvocab->getDefaultConceptScheme(), |
|
226 | 226 | ]; |
227 | 227 | } |
228 | 228 | |
229 | 229 | $notation = $this->getNotation(); |
230 | 230 | if (isset($notation)) { |
231 | - $ret['to']['memberSet'][0]['notation'] = (string) $notation; |
|
231 | + $ret['to']['memberSet'][0]['notation'] = (string)$notation; |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | $label = $this->getLabel($lang, $allowExternal); |