Completed
Pull Request — master (#1020)
by
unknown
01:45
created
model/sparql/JenaTextSparql.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         // 1. Ensure characters with special meaning in Lucene are escaped
42 42
         $lucenemap = array();
43 43
         foreach (str_split(self::LUCENE_ESCAPE_CHARS) as $char) {
44
-            $lucenemap[$char] = '\\' . $char; // escape with a backslash
44
+            $lucenemap[$char] = '\\'.$char; // escape with a backslash
45 45
         }
46 46
         $term = strtr($term, $lucenemap);
47 47
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         // required to fix #908
76 76
         $extraLangTest = ($searchLang) ? " FILTER (langMatches(LANG(?match), '$lang'))" : ' ';
77 77
 
78
-        return $textcond . $extraLangTest;
78
+        return $textcond.$extraLangTest;
79 79
     }
80 80
 
81 81
     /**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      * @return string sparql order by clause
97 97
      */
98 98
     private function formatOrderBy($expression, $lang) {
99
-        if(!$this->model->getConfig()->getCollationEnabled()) {
99
+        if (!$this->model->getConfig()->getCollationEnabled()) {
100 100
             return $expression;
101 101
         }
102 102
         $orderby = sprintf('arq:collation(\'%2$s\', %1$s)', $expression, $lang);
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
         # make text query clause
131 131
         $lcletter = mb_strtolower($letter, 'UTF-8'); // convert to lower case, UTF-8 safe
132 132
         $langClause = $this->generateLangClause($lang);
133
-        $textcondPref = $this->createTextQueryCondition($letter . '*', 'skos:prefLabel', $langClause);
134
-        $textcondAlt = $this->createTextQueryCondition($letter . '*', 'skos:altLabel', $langClause);
135
-        $orderbyclause = $this->formatOrderBy("LCASE(?match)", $lang) . " STR(?s) LCASE(STR(?qualifier))";
133
+        $textcondPref = $this->createTextQueryCondition($letter.'*', 'skos:prefLabel', $langClause);
134
+        $textcondAlt = $this->createTextQueryCondition($letter.'*', 'skos:altLabel', $langClause);
135
+        $orderbyclause = $this->formatOrderBy("LCASE(?match)", $lang)." STR(?s) LCASE(STR(?qualifier))";
136 136
 
137
-        $qualifierClause = $qualifier ? "OPTIONAL { ?s <" . $qualifier->getURI() . "> ?qualifier }" : "";
137
+        $qualifierClause = $qualifier ? "OPTIONAL { ?s <".$qualifier->getURI()."> ?qualifier }" : "";
138 138
 
139
-        $filterDeprecated="";
140
-        if(!$showDeprecated){
141
-            $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }";
139
+        $filterDeprecated = "";
140
+        if (!$showDeprecated) {
141
+            $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }";
142 142
         }
143 143
 
144 144
         $query = <<<EOQ
Please login to merge, or discard this patch.