@@ -220,18 +220,18 @@ discard block |
||
220 | 220 | } |
221 | 221 | |
222 | 222 | $vocabs = $params->getVocabs(); |
223 | - $showDeprecated=false; |
|
223 | + $showDeprecated = false; |
|
224 | 224 | if (sizeof($vocabs) === 1) { // search within vocabulary |
225 | 225 | $voc = $vocabs[0]; |
226 | 226 | $sparql = $voc->getSparql(); |
227 | - $showDeprecated=$voc->getConfig()->getShowDeprecated(); |
|
227 | + $showDeprecated = $voc->getConfig()->getShowDeprecated(); |
|
228 | 228 | } else { // multi-vocabulary or global search |
229 | 229 | $voc = null; |
230 | 230 | $sparql = $this->getDefaultSparql(); |
231 | 231 | // @TODO : in a global search showDeprecated will always be false and cannot be set globally |
232 | 232 | } |
233 | 233 | |
234 | - $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params,$showDeprecated); |
|
234 | + $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params, $showDeprecated); |
|
235 | 235 | if ($params->getRest() && $results && $params->getSearchLimit() !== 0) { |
236 | 236 | $results = array_slice($results, $params->getOffset(), $params->getSearchLimit()); |
237 | 237 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | public function getVocabularyCategories() |
387 | 387 | { |
388 | 388 | $cats = $this->globalConfig->getGraph()->allOfType('skos:Concept'); |
389 | - if(empty($cats)) { |
|
389 | + if (empty($cats)) { |
|
390 | 390 | return array(new VocabularyCategory($this, null)); |
391 | 391 | } |
392 | 392 | |
@@ -469,9 +469,9 @@ discard block |
||
469 | 469 | } |
470 | 470 | |
471 | 471 | // if there are multiple vocabularies and one is the preferred vocabulary, return it |
472 | - if($preferredVocabId != null) { |
|
472 | + if ($preferredVocabId != null) { |
|
473 | 473 | foreach ($vocabs as $vocab) { |
474 | - if($vocab->getId() == $preferredVocabId) { |
|
474 | + if ($vocab->getId() == $preferredVocabId) { |
|
475 | 475 | // double check that a label exists in the preferred vocabulary |
476 | 476 | if ($vocab->getConceptLabel($uri, null) !== null) { |
477 | 477 | return $vocab; |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | // using apc cache for the resource if available |
554 | 554 | if ($this->globalConfig->getCache()->isAvailable()) { |
555 | 555 | // @codeCoverageIgnoreStart |
556 | - $key = 'fetch: ' . $uri; |
|
556 | + $key = 'fetch: '.$uri; |
|
557 | 557 | $resource = $this->globalConfig->getCache()->fetch($key); |
558 | 558 | if ($resource === null || $resource === false) { // was not found in cache, or previous request failed |
559 | 559 | $resource = $this->resolver->resolve($uri, $this->getConfig()->getHttpTimeout()); |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | */ |
575 | 575 | public function getSparqlImplementation($dialect, $endpoint, $graph) |
576 | 576 | { |
577 | - $classname = $dialect . "Sparql"; |
|
577 | + $classname = $dialect."Sparql"; |
|
578 | 578 | |
579 | 579 | return new $classname($endpoint, $graph, $this); |
580 | 580 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | { |
37 | 37 | $label = $this->getLabel(); |
38 | 38 | $notation = $this->getNotation(); |
39 | - return $notation . $label; |
|
39 | + return $notation.$label; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function getType() |
@@ -187,42 +187,42 @@ 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 | - 'description' => gettext($this->type . "_help"), // pop-up text |
|
202 | + 'description' => gettext($this->type."_help"), // pop-up text |
|
203 | 203 | 'hrefLink' => $hrefLink, // link to resource as displayed in the UI |
204 | 204 | 'lang' => $propertyLang, // TBD: could it be part of the prefLabel? |
205 | - 'vocabName' => (string) $this->getVocabName(), // vocabulary as displayed in the UI |
|
205 | + 'vocabName' => (string)$this->getVocabName(), // vocabulary as displayed in the UI |
|
206 | 206 | 'typeLabel' => gettext($this->type), // a text used in the UI instead of, for example, skos:closeMatch |
207 | 207 | ]; |
208 | 208 | |
209 | 209 | $fromScheme = $this->vocab->getDefaultConceptScheme(); |
210 | 210 | if (isset($fromScheme)) { |
211 | 211 | $ret['fromScheme'] = [ |
212 | - 'uri' => (string) $fromScheme, |
|
212 | + 'uri' => (string)$fromScheme, |
|
213 | 213 | ]; |
214 | 214 | } |
215 | 215 | |
216 | 216 | $exvocab = $this->getExvocab(); |
217 | 217 | if (isset($exvocab)) { |
218 | 218 | $ret['toScheme'] = [ |
219 | - 'uri' => (string) $exvocab->getDefaultConceptScheme(), |
|
219 | + 'uri' => (string)$exvocab->getDefaultConceptScheme(), |
|
220 | 220 | ]; |
221 | 221 | } |
222 | 222 | |
223 | 223 | $notation = $this->getNotation(); |
224 | 224 | if (isset($notation)) { |
225 | - $ret['to']['memberSet'][0]['notation'] = (string) $notation; |
|
225 | + $ret['to']['memberSet'][0]['notation'] = (string)$notation; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | $label = $this->getLabel($lang, $queryExVocabs); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $opts = array('http' => array('method'=>'HEAD', |
14 | 14 | 'user_agent' => 'Skosmos', |
15 | 15 | 'timeout' => $timeout)); |
16 | - $context = stream_context_create($opts); |
|
16 | + $context = stream_context_create($opts); |
|
17 | 17 | $fd = fopen($this->uri, 'rb', false, $context); |
18 | 18 | $headers = stream_get_meta_data($fd)['wrapper_data']; |
19 | 19 | foreach ($headers as $header) { |