Passed
Push — sparql-query-cache ( d29b6d )
by Osma
06:54
created
src/model/Model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
     }
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/controller/RestController.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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, FILTER_FLAG_NO_ENCODE_QUOTES) . "(" . json_encode($data) . ");";
28
+            echo filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES)."(".json_encode($data).");";
29 29
             return;
30 30
         }
31 31
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
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,
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
@@ -962,7 +962,7 @@  discard block
 block discarded – undo
962 962
                         }
963 963
                     }
964 964
                     // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs)
965
-                    if (! isset($results[$uri]['top'])) {
965
+                    if (!isset($results[$uri]['top'])) {
966 966
                         $results[$uri]['top'] = $results[$uri]['tops'][0];
967 967
                     }
968 968
                 } else {
@@ -1165,10 +1165,10 @@  discard block
 block discarded – undo
1165 1165
         }
1166 1166
         return $this->returnJson(array_merge_recursive(
1167 1167
             $this->context,
1168
-            array('@context' => array( '@language' => $request->getLang(),
1168
+            array('@context' => array('@language' => $request->getLang(),
1169 1169
                                                                                      'prefLabel' => 'skos:prefLabel',
1170 1170
                                                                                      'xsd' => 'http://www.w3.org/2001/XMLSchema#',
1171
-                                                                                     'date' => array( '@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime') )
1171
+                                                                                     'date' => array('@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#dateTime'))
1172 1172
                                                         ),
1173 1173
             array('changeList' => $simpleChangeList)
1174 1174
         ));
Please login to merge, or discard this patch.
src/model/resolver/LOCResource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
             $opts = array('http' => array('method' => 'HEAD',
15 15
                                           'user_agent' => 'Skosmos',
16 16
                                           'timeout' => $timeout));
17
-            $context  = stream_context_create($opts);
17
+            $context = stream_context_create($opts);
18 18
             $fd = fopen($this->uri, 'rb', false, $context);
19 19
             if ($fd === false) {
20 20
                 return null;
Please login to merge, or discard this patch.
src/util/JsTranslationExtractor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function extract($directory, MessageCatalogue $catalogue): void
23 23
     {
24 24
         if (!is_dir($this->directory)) {
25
-            echo "Invalid directory: $this->directory" . PHP_EOL;
25
+            echo "Invalid directory: $this->directory".PHP_EOL;
26 26
             return;
27 27
         }
28 28
         $iterator = new \RecursiveIteratorIterator(
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $content = file_get_contents($file->getPathname());
36 36
             preg_match_all('/\$t\([\'"]([^\'"]+)[\'"]\)/', $content, $matches);
37 37
             foreach ($matches[1] as $key) {
38
-                $catalogue->set($this->prefix . $key, $key);
38
+                $catalogue->set($this->prefix.$key, $key);
39 39
             }
40 40
         }
41 41
     }
Please login to merge, or discard this patch.
src/model/PluginRegister.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                         $ret[$name] = $files[$type];
63 63
                     } else {
64 64
                         foreach ($files[$type] as $file) {
65
-                            array_push($ret[$name], 'plugins/' . $name . '/' . $file);
65
+                            array_push($ret[$name], 'plugins/'.$name.'/'.$file);
66 66
                         }
67 67
                     }
68 68
                 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     protected function flatten($array)
164 164
     {
165 165
         $return = array();
166
-        array_walk_recursive($array, function ($a) use (&$return) { $return[] = $a; });
166
+        array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; });
167 167
         return $return;
168 168
     }
169 169
 
Please login to merge, or discard this patch.
src/model/sparql/GenericSparql.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         $queryId = sprintf("%05d", rand(0, 99999));
98 98
         $logger = $this->model->getLogger();
99
-        $logger->info("[qid $queryId] SPARQL query:\n" . $this->generateQueryPrefixes($query) . "\n$query\n");
99
+        $logger->info("[qid $queryId] SPARQL query:\n".$this->generateQueryPrefixes($query)."\n$query\n");
100 100
         $starttime = microtime(true);
101 101
         $result = $this->client->query($query);
102 102
         $elapsed = intval(round((microtime(true) - $starttime) * 1000));
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     protected function query($query)
120 120
     {
121
-        $key = $this->endpoint . " " . $query;
121
+        $key = $this->endpoint." ".$query;
122 122
         if (!array_key_exists($key, self::$querycache)) {
123 123
             self::$querycache[$key] = $this->doQuery($query);
124 124
         }
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
         $gcl = $this->graphClause;
282 282
         $classes = ($classes) ? $classes : array('http://www.w3.org/2004/02/skos/core#Concept');
283 283
 
284
-        $quote_string = function ($val) { return "'$val'"; };
284
+        $quote_string = function($val) { return "'$val'"; };
285 285
         $quoted_values = array_map($quote_string, $langs);
286
-        $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))";
286
+        $langFilter = "FILTER(?lang IN (".implode(',', $quoted_values)."))";
287 287
 
288 288
         $values = $this->formatValues('?type', $classes, 'uri');
289 289
         $valuesProp = $this->formatValues('?prop', $props, null);
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
             $values[] = "<$graph>";
816 816
         }
817 817
         if (count($values)) {
818
-            return "FILTER (?graph IN (" . implode(',', $values) . "))";
818
+            return "FILTER (?graph IN (".implode(',', $values)."))";
819 819
         }
820 820
     }
821 821
 
@@ -827,16 +827,16 @@  discard block
 block discarded – undo
827 827
      */
828 828
     protected function formatLimitAndOffset($limit, $offset)
829 829
     {
830
-        $limit = ($limit) ? 'LIMIT ' . $limit : '';
831
-        $offset = ($offset) ? 'OFFSET ' . $offset : '';
830
+        $limit = ($limit) ? 'LIMIT '.$limit : '';
831
+        $offset = ($offset) ? 'OFFSET '.$offset : '';
832 832
         // eliminating whitespace and line changes when the conditions aren't needed.
833 833
         $limitandoffset = '';
834 834
         if ($limit && $offset) {
835
-            $limitandoffset = "\n" . $limit . "\n" . $offset;
835
+            $limitandoffset = "\n".$limit."\n".$offset;
836 836
         } elseif ($limit) {
837
-            $limitandoffset = "\n" . $limit;
837
+            $limitandoffset = "\n".$limit;
838 838
         } elseif ($offset) {
839
-            $limitandoffset = "\n" . $offset;
839
+            $limitandoffset = "\n".$offset;
840 840
         }
841 841
 
842 842
         return $limitandoffset;
@@ -992,14 +992,14 @@  discard block
 block discarded – undo
992 992
         // if search language and UI/display language differ, must also consider case where there is no prefLabel in
993 993
         // the display language; in that case, should use the label with the same language as the matched label
994 994
         $labelcondFallback = ($searchLang != $lang) ?
995
-          "OPTIONAL { # in case previous OPTIONAL block gives no labels\n" .
995
+          "OPTIONAL { # in case previous OPTIONAL block gives no labels\n".
996 996
           "?s skos:prefLabel ?label . FILTER (LANGMATCHES(LANG(?label), LANG(?match))) }" : "";
997 997
 
998 998
         //  Including the labels if there is no query term given.
999 999
         if ($rawterm === '') {
1000 1000
             $labelClause = "?s skos:prefLabel ?label .";
1001
-            $labelClause = ($lang) ? $labelClause . " FILTER (LANGMATCHES(LANG(?label), '$lang'))" : $labelClause . "";
1002
-            return $labelClause . " BIND(?label AS ?match)";
1001
+            $labelClause = ($lang) ? $labelClause." FILTER (LANGMATCHES(LANG(?label), '$lang'))" : $labelClause."";
1002
+            return $labelClause." BIND(?label AS ?match)";
1003 1003
         }
1004 1004
 
1005 1005
         /*
@@ -1083,9 +1083,9 @@  discard block
 block discarded – undo
1083 1083
             $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }";
1084 1084
         }
1085 1085
         // extra conditions for parent and group, if specified
1086
-        $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <" . $params->getParentLimit() . "> ." : "";
1087
-        $groupcond = ($params->getGroupLimit()) ? "<" . $params->getGroupLimit() . "> skos:member ?s ." : "";
1088
-        $pgcond = $parentcond . $groupcond;
1086
+        $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <".$params->getParentLimit()."> ." : "";
1087
+        $groupcond = ($params->getGroupLimit()) ? "<".$params->getGroupLimit()."> skos:member ?s ." : "";
1088
+        $pgcond = $parentcond.$groupcond;
1089 1089
 
1090 1090
         $orderextra = $this->isDefaultEndpoint() ? $this->graph : '';
1091 1091
 
@@ -1173,7 +1173,7 @@  discard block
 block discarded – undo
1173 1173
 
1174 1174
         if (!empty($fields)) {
1175 1175
             foreach ($fields as $prop) {
1176
-                $propname = $prop . 's';
1176
+                $propname = $prop.'s';
1177 1177
                 if (isset($row->$propname)) {
1178 1178
                     foreach (explode("\n", $row->$propname->getValue()) as $line) {
1179 1179
                         $rdata = str_getcsv($line, ',', '"', '"');
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
                             $propvals = $rdata[2];
1189 1189
                         }
1190 1190
 
1191
-                        $hit['skos:' . $prop][] = $propvals;
1191
+                        $hit['skos:'.$prop][] = $propvals;
1192 1192
                     }
1193 1193
                 }
1194 1194
             }
@@ -1323,7 +1323,7 @@  discard block
 block discarded – undo
1323 1323
         $conditions = $this->formatFilterConditions($letter, $lang);
1324 1324
         $filtercondLabel = $conditions['filterpref'];
1325 1325
         $filtercondALabel = $conditions['filteralt'];
1326
-        $qualifierClause = $qualifier ? "OPTIONAL { ?s <" . $qualifier->getURI() . "> ?qualifier }" : "";
1326
+        $qualifierClause = $qualifier ? "OPTIONAL { ?s <".$qualifier->getURI()."> ?qualifier }" : "";
1327 1327
         $filterDeprecated = "";
1328 1328
         if (!$showDeprecated) {
1329 1329
             $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }";
@@ -1820,7 +1820,7 @@  discard block
 block discarded – undo
1820 1820
                 if (!isset($row->label) || $row->label->getLang() === $lang) {
1821 1821
                     $ret[$row->object->getUri()] = $val;
1822 1822
                 } elseif ($row->label->getLang() === $fallbacklang) {
1823
-                    $val['label'] .= ' (' . $row->label->getLang() . ')';
1823
+                    $val['label'] .= ' ('.$row->label->getLang().')';
1824 1824
                     $ret[$row->object->getUri()] = $val;
1825 1825
                 }
1826 1826
             }
@@ -1919,10 +1919,10 @@  discard block
 block discarded – undo
1919 1919
 
1920 1920
             $label = null;
1921 1921
             if (isset($row->label)) {
1922
-                if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang . "-") == 0) {
1922
+                if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang."-") == 0) {
1923 1923
                     $label = $row->label->getValue();
1924 1924
                 } else {
1925
-                    $label = $row->label->getValue() . " (" . $row->label->getLang() . ")";
1925
+                    $label = $row->label->getValue()." (".$row->label->getLang().")";
1926 1926
                 }
1927 1927
 
1928 1928
             }
@@ -2000,8 +2000,8 @@  discard block
 block discarded – undo
2000 2000
         foreach ($result as $row) {
2001 2001
             if (isset($row->top) && isset($row->label)) {
2002 2002
                 $label = $row->label->getValue();
2003
-                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
2004
-                    $label .= ' (' . $row->label->getLang() . ')';
2003
+                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang."-") !== 0) {
2004
+                    $label .= ' ('.$row->label->getLang().')';
2005 2005
                 }
2006 2006
                 $top = array('uri' => $row->top->getUri(), 'topConceptOf' => $row->topuri->getUri(), 'label' => $label, 'hasChildren' => filter_var($row->children->getValue(), FILTER_VALIDATE_BOOLEAN));
2007 2007
                 if (isset($row->notation)) {
@@ -2108,8 +2108,8 @@  discard block
 block discarded – undo
2108 2108
                 $label = null;
2109 2109
                 if (isset($row->childlabel)) {
2110 2110
                     $label = $row->childlabel->getValue();
2111
-                    if ($row->childlabel->getLang() !== $lang && strpos($row->childlabel->getLang(), $lang . "-") !== 0) {
2112
-                        $label .= " (" . $row->childlabel->getLang() . ")";
2111
+                    if ($row->childlabel->getLang() !== $lang && strpos($row->childlabel->getLang(), $lang."-") !== 0) {
2112
+                        $label .= " (".$row->childlabel->getLang().")";
2113 2113
                     }
2114 2114
 
2115 2115
                 }
@@ -2130,8 +2130,8 @@  discard block
 block discarded – undo
2130 2130
             }
2131 2131
             if (isset($row->label)) {
2132 2132
                 $preflabel = $row->label->getValue();
2133
-                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) {
2134
-                    $preflabel .= ' (' . $row->label->getLang() . ')';
2133
+                if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang."-") !== 0) {
2134
+                    $preflabel .= ' ('.$row->label->getLang().')';
2135 2135
                 }
2136 2136
 
2137 2137
                 $ret[$uri]['prefLabel'] = $preflabel;
@@ -2298,10 +2298,10 @@  discard block
 block discarded – undo
2298 2298
                     'type' => array($row->type->shorten()),
2299 2299
                 );
2300 2300
                 if (isset($row->label)) {
2301
-                    if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang . "-") == 0) {
2301
+                    if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang."-") == 0) {
2302 2302
                         $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue();
2303 2303
                     } else {
2304
-                        $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue() . " (" . $row->label->getLang() . ")";
2304
+                        $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue()." (".$row->label->getLang().")";
2305 2305
                     }
2306 2306
 
2307 2307
                 }
@@ -2348,7 +2348,7 @@  discard block
 block discarded – undo
2348 2348
     private function generateChangeListQuery($prop, $lang, $offset, $limit = 200, $showDeprecated = false)
2349 2349
     {
2350 2350
         $fcl = $this->generateFromClause();
2351
-        $offset = ($offset) ? 'OFFSET ' . $offset : '';
2351
+        $offset = ($offset) ? 'OFFSET '.$offset : '';
2352 2352
 
2353 2353
         //Additional clauses when deprecated concepts need to be included in the results
2354 2354
         $deprecatedOptions = '';
Please login to merge, or discard this patch.