@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @param string $prop property type eg. 'rdf:type'. |
23 | 23 | * @param string $label |
24 | 24 | */ |
25 | - public function __construct($prop, $label, $super=null, $sort_by_notation=false) |
|
25 | + public function __construct($prop, $label, $super = null, $sort_by_notation = false) |
|
26 | 26 | { |
27 | 27 | $this->prop = $prop; |
28 | 28 | $this->label = $label; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function getDescription() |
63 | 63 | { |
64 | - $helpprop = $this->prop . "_help"; |
|
64 | + $helpprop = $this->prop."_help"; |
|
65 | 65 | |
66 | 66 | return gettext($helpprop); // can't use string constant, it'd be picked up by xgettext |
67 | 67 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | public function addValue($value) |
82 | 82 | { |
83 | - $this->values[ltrim($value->getNotation() . ' ') . $value->getLabel() . rtrim(' ' . $value->getUri())] = $value; |
|
83 | + $this->values[ltrim($value->getNotation().' ').$value->getLabel().rtrim(' '.$value->getUri())] = $value; |
|
84 | 84 | $this->is_sorted = false; |
85 | 85 | } |
86 | 86 |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | protected function query($query) { |
89 | 89 | $queryId = sprintf("%05d", rand(0, 99999)); |
90 | 90 | $logger = $this->model->getLogger(); |
91 | - $logger->info("[qid $queryId] SPARQL query:\n" . $this->generateQueryPrefixes($query) . "\n$query\n"); |
|
91 | + $logger->info("[qid $queryId] SPARQL query:\n".$this->generateQueryPrefixes($query)."\n$query\n"); |
|
92 | 92 | $starttime = microtime(true); |
93 | 93 | $result = $this->client->query($query); |
94 | 94 | $elapsed = intval(round((microtime(true) - $starttime) * 1000)); |
95 | - if(method_exists($result, 'numRows')) { |
|
95 | + if (method_exists($result, 'numRows')) { |
|
96 | 96 | $numRows = $result->numRows(); |
97 | 97 | $logger->info("[qid $queryId] result: $numRows rows returned in $elapsed ms"); |
98 | 98 | } else { // graph result |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @param Vocabulary[]|null $vocabs |
109 | 109 | * @return string |
110 | 110 | */ |
111 | - protected function generateFromClause($vocabs=null) { |
|
111 | + protected function generateFromClause($vocabs = null) { |
|
112 | 112 | $clause = ''; |
113 | 113 | if (!$vocabs) { |
114 | 114 | return $this->graph !== '?graph' && $this->graph !== NULL ? "FROM <$this->graph>" : ''; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | |
236 | 236 | $quote_string = function($val) { return "'$val'"; }; |
237 | 237 | $quoted_values = array_map($quote_string, $langs); |
238 | - $langFilter = "FILTER(?lang IN (" . implode(',', $quoted_values) . "))"; |
|
238 | + $langFilter = "FILTER(?lang IN (".implode(',', $quoted_values)."))"; |
|
239 | 239 | |
240 | 240 | $values = $this->formatValues('?type', $classes, 'uri'); |
241 | 241 | $valuesProp = $this->formatValues('?prop', $props, null); |
@@ -661,9 +661,9 @@ discard block |
||
661 | 661 | $conceptscheme['title'] = $row->title->getValue(); |
662 | 662 | } |
663 | 663 | // add dct:subject and their labels in the result |
664 | - if(isset($row->domain) && isset($row->domainLabel)){ |
|
665 | - $conceptscheme['subject']['uri']=$row->domain->getURI(); |
|
666 | - $conceptscheme['subject']['prefLabel']=$row->domainLabel->getValue(); |
|
664 | + if (isset($row->domain) && isset($row->domainLabel)) { |
|
665 | + $conceptscheme['subject']['uri'] = $row->domain->getURI(); |
|
666 | + $conceptscheme['subject']['prefLabel'] = $row->domainLabel->getValue(); |
|
667 | 667 | } |
668 | 668 | |
669 | 669 | $ret[$row->cs->getURI()] = $conceptscheme; |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | $values[] = "<$graph>"; |
731 | 731 | } |
732 | 732 | if (count($values)) { |
733 | - return "FILTER (?graph IN (" . implode(',', $values) . "))"; |
|
733 | + return "FILTER (?graph IN (".implode(',', $values)."))"; |
|
734 | 734 | } |
735 | 735 | } |
736 | 736 | |
@@ -741,16 +741,16 @@ discard block |
||
741 | 741 | * @return string sparql query clauses |
742 | 742 | */ |
743 | 743 | protected function formatLimitAndOffset($limit, $offset) { |
744 | - $limit = ($limit) ? 'LIMIT ' . $limit : ''; |
|
745 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
744 | + $limit = ($limit) ? 'LIMIT '.$limit : ''; |
|
745 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
746 | 746 | // eliminating whitespace and line changes when the conditions aren't needed. |
747 | 747 | $limitandoffset = ''; |
748 | 748 | if ($limit && $offset) { |
749 | - $limitandoffset = "\n" . $limit . "\n" . $offset; |
|
749 | + $limitandoffset = "\n".$limit."\n".$offset; |
|
750 | 750 | } elseif ($limit) { |
751 | - $limitandoffset = "\n" . $limit; |
|
751 | + $limitandoffset = "\n".$limit; |
|
752 | 752 | } elseif ($offset) { |
753 | - $limitandoffset = "\n" . $offset; |
|
753 | + $limitandoffset = "\n".$offset; |
|
754 | 754 | } |
755 | 755 | |
756 | 756 | return $limitandoffset; |
@@ -902,14 +902,14 @@ discard block |
||
902 | 902 | // if search language and UI/display language differ, must also consider case where there is no prefLabel in |
903 | 903 | // the display language; in that case, should use the label with the same language as the matched label |
904 | 904 | $labelcondFallback = ($searchLang != $lang) ? |
905 | - "OPTIONAL { # in case previous OPTIONAL block gives no labels\n" . |
|
905 | + "OPTIONAL { # in case previous OPTIONAL block gives no labels\n". |
|
906 | 906 | "?s skos:prefLabel ?label . FILTER (LANGMATCHES(LANG(?label), LANG(?match))) }" : ""; |
907 | 907 | |
908 | 908 | // Including the labels if there is no query term given. |
909 | 909 | if ($rawterm === '') { |
910 | 910 | $labelClause = "?s skos:prefLabel ?label ."; |
911 | - $labelClause = ($lang) ? $labelClause . " FILTER (LANGMATCHES(LANG(?label), '$lang'))" : $labelClause . ""; |
|
912 | - return $labelClause . " BIND(?label AS ?match)"; |
|
911 | + $labelClause = ($lang) ? $labelClause." FILTER (LANGMATCHES(LANG(?label), '$lang'))" : $labelClause.""; |
|
912 | + return $labelClause." BIND(?label AS ?match)"; |
|
913 | 913 | } |
914 | 914 | |
915 | 915 | /* |
@@ -973,20 +973,20 @@ discard block |
||
973 | 973 | $schemecond = ''; |
974 | 974 | if (!empty($schemes)) { |
975 | 975 | $conditions = array(); |
976 | - foreach($schemes as $scheme) { |
|
976 | + foreach ($schemes as $scheme) { |
|
977 | 977 | $conditions[] = "{?s skos:inScheme <$scheme>}"; |
978 | 978 | } |
979 | - $schemecond = '{'.implode(" UNION ",$conditions).'}'; |
|
979 | + $schemecond = '{'.implode(" UNION ", $conditions).'}'; |
|
980 | 980 | } |
981 | - $filterDeprecated=""; |
|
981 | + $filterDeprecated = ""; |
|
982 | 982 | //show or hide deprecated concepts |
983 | - if(!$showDeprecated){ |
|
984 | - $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
983 | + if (!$showDeprecated) { |
|
984 | + $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
985 | 985 | } |
986 | 986 | // extra conditions for parent and group, if specified |
987 | - $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <" . $params->getParentLimit() . "> ." : ""; |
|
988 | - $groupcond = ($params->getGroupLimit()) ? "<" . $params->getGroupLimit() . "> skos:member ?s ." : ""; |
|
989 | - $pgcond = $parentcond . $groupcond; |
|
987 | + $parentcond = ($params->getParentLimit()) ? "?s skos:broader+ <".$params->getParentLimit()."> ." : ""; |
|
988 | + $groupcond = ($params->getGroupLimit()) ? "<".$params->getGroupLimit()."> skos:member ?s ." : ""; |
|
989 | + $pgcond = $parentcond.$groupcond; |
|
990 | 990 | |
991 | 991 | $orderextra = $this->isDefaultEndpoint() ? $this->graph : ''; |
992 | 992 | |
@@ -1059,9 +1059,9 @@ discard block |
||
1059 | 1059 | $hit['type'][] = $this->shortenUri($typeuri); |
1060 | 1060 | } |
1061 | 1061 | |
1062 | - if(!empty($fields)) { |
|
1062 | + if (!empty($fields)) { |
|
1063 | 1063 | foreach ($fields as $prop) { |
1064 | - $propname = $prop . 's'; |
|
1064 | + $propname = $prop.'s'; |
|
1065 | 1065 | if (isset($row->$propname)) { |
1066 | 1066 | foreach (explode("\n", $row->$propname->getValue()) as $line) { |
1067 | 1067 | $rdata = str_getcsv($line, ',', '"', '"'); |
@@ -1076,7 +1076,7 @@ discard block |
||
1076 | 1076 | $propvals = $rdata[2]; |
1077 | 1077 | } |
1078 | 1078 | |
1079 | - $hit['skos:' . $prop][] = $propvals; |
|
1079 | + $hit['skos:'.$prop][] = $propvals; |
|
1080 | 1080 | } |
1081 | 1081 | } |
1082 | 1082 | } |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | * @return array query result object |
1153 | 1153 | */ |
1154 | 1154 | public function queryConcepts($vocabs, $fields = null, $unique = false, $params, $showDeprecated = false) { |
1155 | - $query = $this->generateConceptSearchQuery($fields, $unique, $params,$showDeprecated); |
|
1155 | + $query = $this->generateConceptSearchQuery($fields, $unique, $params, $showDeprecated); |
|
1156 | 1156 | $results = $this->query($query); |
1157 | 1157 | return $this->transformConceptSearchResults($results, $vocabs, $fields); |
1158 | 1158 | } |
@@ -1207,10 +1207,10 @@ discard block |
||
1207 | 1207 | $conditions = $this->formatFilterConditions($letter, $lang); |
1208 | 1208 | $filtercondLabel = $conditions['filterpref']; |
1209 | 1209 | $filtercondALabel = $conditions['filteralt']; |
1210 | - $qualifierClause = $qualifier ? "OPTIONAL { ?s <" . $qualifier->getURI() . "> ?qualifier }" : ""; |
|
1211 | - $filterDeprecated=""; |
|
1212 | - if(!$showDeprecated){ |
|
1213 | - $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
1210 | + $qualifierClause = $qualifier ? "OPTIONAL { ?s <".$qualifier->getURI()."> ?qualifier }" : ""; |
|
1211 | + $filterDeprecated = ""; |
|
1212 | + if (!$showDeprecated) { |
|
1213 | + $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
1214 | 1214 | } |
1215 | 1215 | $query = <<<EOQ |
1216 | 1216 | SELECT DISTINCT ?s ?label ?alabel ?qualifier $fcl |
@@ -1632,7 +1632,7 @@ discard block |
||
1632 | 1632 | if (!isset($row->label) || $row->label->getLang() === $lang) { |
1633 | 1633 | $ret[$row->object->getUri()] = $val; |
1634 | 1634 | } elseif ($row->label->getLang() === $fallbacklang) { |
1635 | - $val['label'] .= ' (' . $row->label->getLang() . ')'; |
|
1635 | + $val['label'] .= ' ('.$row->label->getLang().')'; |
|
1636 | 1636 | $ret[$row->object->getUri()] = $val; |
1637 | 1637 | } |
1638 | 1638 | } |
@@ -1728,10 +1728,10 @@ discard block |
||
1728 | 1728 | |
1729 | 1729 | $label = null; |
1730 | 1730 | if (isset($row->label)) { |
1731 | - if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang . "-") == 0) { |
|
1731 | + if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang."-") == 0) { |
|
1732 | 1732 | $label = $row->label->getValue(); |
1733 | 1733 | } else { |
1734 | - $label = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
1734 | + $label = $row->label->getValue()." (".$row->label->getLang().")"; |
|
1735 | 1735 | } |
1736 | 1736 | |
1737 | 1737 | } |
@@ -1807,8 +1807,8 @@ discard block |
||
1807 | 1807 | foreach ($result as $row) { |
1808 | 1808 | if (isset($row->top) && isset($row->label)) { |
1809 | 1809 | $label = $row->label->getValue(); |
1810 | - if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) { |
|
1811 | - $label .= ' (' . $row->label->getLang() . ')'; |
|
1810 | + if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang."-") !== 0) { |
|
1811 | + $label .= ' ('.$row->label->getLang().')'; |
|
1812 | 1812 | } |
1813 | 1813 | $top = array('uri' => $row->top->getUri(), 'topConceptOf' => $row->topuri->getUri(), 'label' => $label, 'hasChildren' => filter_var($row->children->getValue(), FILTER_VALIDATE_BOOLEAN)); |
1814 | 1814 | if (isset($row->notation)) { |
@@ -1901,7 +1901,7 @@ discard block |
||
1901 | 1901 | $ret[$uri]['exact'] = $row->exact->getUri(); |
1902 | 1902 | } |
1903 | 1903 | if (isset($row->tops)) { |
1904 | - $topConceptsList=explode(" ", $row->tops->getValue()); |
|
1904 | + $topConceptsList = explode(" ", $row->tops->getValue()); |
|
1905 | 1905 | // sort to garantee an alphabetical ordering of the URI |
1906 | 1906 | sort($topConceptsList); |
1907 | 1907 | $ret[$uri]['tops'] = $topConceptsList; |
@@ -1914,8 +1914,8 @@ discard block |
||
1914 | 1914 | $label = null; |
1915 | 1915 | if (isset($row->childlabel)) { |
1916 | 1916 | $label = $row->childlabel->getValue(); |
1917 | - if ($row->childlabel->getLang() !== $lang && strpos($row->childlabel->getLang(), $lang . "-") !== 0) { |
|
1918 | - $label .= " (" . $row->childlabel->getLang() . ")"; |
|
1917 | + if ($row->childlabel->getLang() !== $lang && strpos($row->childlabel->getLang(), $lang."-") !== 0) { |
|
1918 | + $label .= " (".$row->childlabel->getLang().")"; |
|
1919 | 1919 | } |
1920 | 1920 | |
1921 | 1921 | } |
@@ -1936,8 +1936,8 @@ discard block |
||
1936 | 1936 | } |
1937 | 1937 | if (isset($row->label)) { |
1938 | 1938 | $preflabel = $row->label->getValue(); |
1939 | - if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang . "-") !== 0) { |
|
1940 | - $preflabel .= ' (' . $row->label->getLang() . ')'; |
|
1939 | + if ($row->label->getLang() && $row->label->getLang() !== $lang && strpos($row->label->getLang(), $lang."-") !== 0) { |
|
1940 | + $preflabel .= ' ('.$row->label->getLang().')'; |
|
1941 | 1941 | } |
1942 | 1942 | |
1943 | 1943 | $ret[$uri]['prefLabel'] = $preflabel; |
@@ -2058,9 +2058,9 @@ discard block |
||
2058 | 2058 | */ |
2059 | 2059 | private function generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated = false) { |
2060 | 2060 | $fcl = $this->generateFromClause(); |
2061 | - $filterDeprecated=""; |
|
2062 | - if(!$showDeprecated){ |
|
2063 | - $filterDeprecated=" FILTER NOT EXISTS { ?conc owl:deprecated true }"; |
|
2061 | + $filterDeprecated = ""; |
|
2062 | + if (!$showDeprecated) { |
|
2063 | + $filterDeprecated = " FILTER NOT EXISTS { ?conc owl:deprecated true }"; |
|
2064 | 2064 | } |
2065 | 2065 | $query = <<<EOQ |
2066 | 2066 | SELECT ?conc ?super ?label ?members ?type ?notation $fcl |
@@ -2099,10 +2099,10 @@ discard block |
||
2099 | 2099 | 'type' => array($row->type->shorten()), |
2100 | 2100 | ); |
2101 | 2101 | if (isset($row->label)) { |
2102 | - if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang . "-") == 0) { |
|
2102 | + if ($row->label->getLang() == $lang || strpos($row->label->getLang(), $lang."-") == 0) { |
|
2103 | 2103 | $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue(); |
2104 | 2104 | } else { |
2105 | - $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue() . " (" . $row->label->getLang() . ")"; |
|
2105 | + $values[$row->conc->getURI()]['prefLabel'] = $row->label->getValue()." (".$row->label->getLang().")"; |
|
2106 | 2106 | } |
2107 | 2107 | |
2108 | 2108 | } |
@@ -2130,8 +2130,8 @@ discard block |
||
2130 | 2130 | * @param boolean $showDeprecated whether to include deprecated concepts in search results |
2131 | 2131 | * @return array Result array with concept URI as key and concept label as value |
2132 | 2132 | */ |
2133 | - public function listConceptGroupContents($groupClass, $group, $lang,$showDeprecated = false) { |
|
2134 | - $query = $this->generateConceptGroupContentsQuery($groupClass, $group, $lang,$showDeprecated); |
|
2133 | + public function listConceptGroupContents($groupClass, $group, $lang, $showDeprecated = false) { |
|
2134 | + $query = $this->generateConceptGroupContentsQuery($groupClass, $group, $lang, $showDeprecated); |
|
2135 | 2135 | $result = $this->query($query); |
2136 | 2136 | return $this->transformConceptGroupContentsResults($result, $lang); |
2137 | 2137 | } |
@@ -2144,7 +2144,7 @@ discard block |
||
2144 | 2144 | */ |
2145 | 2145 | private function generateChangeListQuery($lang, $offset, $prop) { |
2146 | 2146 | $fcl = $this->generateFromClause(); |
2147 | - $offset = ($offset) ? 'OFFSET ' . $offset : ''; |
|
2147 | + $offset = ($offset) ? 'OFFSET '.$offset : ''; |
|
2148 | 2148 | |
2149 | 2149 | $query = <<<EOQ |
2150 | 2150 | SELECT DISTINCT ?concept ?date ?label $fcl |
@@ -41,7 +41,7 @@ discard block |
||
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 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @return string sparql order by clause |
93 | 93 | */ |
94 | 94 | private function formatOrderBy($expression, $lang) { |
95 | - if(!$this->model->getConfig()->getCollationEnabled()) { |
|
95 | + if (!$this->model->getConfig()->getCollationEnabled()) { |
|
96 | 96 | return $expression; |
97 | 97 | } |
98 | 98 | $orderby = sprintf('arq:collation(\'%2$s\', %1$s)', $expression, $lang); |
@@ -126,15 +126,15 @@ discard block |
||
126 | 126 | # make text query clause |
127 | 127 | $lcletter = mb_strtolower($letter, 'UTF-8'); // convert to lower case, UTF-8 safe |
128 | 128 | $langClause = $this->generateLangClause($lang); |
129 | - $textcondPref = $this->createTextQueryCondition($letter . '*', 'skos:prefLabel', $langClause); |
|
130 | - $textcondAlt = $this->createTextQueryCondition($letter . '*', 'skos:altLabel', $langClause); |
|
131 | - $orderbyclause = $this->formatOrderBy("LCASE(?match)", $lang) . " STR(?s) LCASE(STR(?qualifier))"; |
|
129 | + $textcondPref = $this->createTextQueryCondition($letter.'*', 'skos:prefLabel', $langClause); |
|
130 | + $textcondAlt = $this->createTextQueryCondition($letter.'*', 'skos:altLabel', $langClause); |
|
131 | + $orderbyclause = $this->formatOrderBy("LCASE(?match)", $lang)." STR(?s) LCASE(STR(?qualifier))"; |
|
132 | 132 | |
133 | - $qualifierClause = $qualifier ? "OPTIONAL { ?s <" . $qualifier->getURI() . "> ?qualifier }" : ""; |
|
133 | + $qualifierClause = $qualifier ? "OPTIONAL { ?s <".$qualifier->getURI()."> ?qualifier }" : ""; |
|
134 | 134 | |
135 | - $filterDeprecated=""; |
|
136 | - if(!$showDeprecated){ |
|
137 | - $filterDeprecated="FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
135 | + $filterDeprecated = ""; |
|
136 | + if (!$showDeprecated) { |
|
137 | + $filterDeprecated = "FILTER NOT EXISTS { ?s owl:deprecated true }"; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $query = <<<EOQ |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | private $pluginParameters; |
10 | 10 | private $languageOrderCache = array(); |
11 | 11 | |
12 | - public function __construct($resource, $globalPlugins=array()) |
|
12 | + public function __construct($resource, $globalPlugins = array()) |
|
13 | 13 | { |
14 | 14 | $this->resource = $resource; |
15 | 15 | $plugins = $this->resource->allLiterals('skosmos:usePlugin'); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $paramValue = $paramLiteral->getValue(); |
38 | 38 | $paramLang = $paramLiteral->getLang(); |
39 | 39 | if ($paramLang) { |
40 | - $paramName .= '_' . $paramLang; |
|
40 | + $paramName .= '_'.$paramLang; |
|
41 | 41 | } |
42 | 42 | $this->pluginParameters[$pluginName][$paramName] = $paramValue; |
43 | 43 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $langs = $this->getLanguages(); |
65 | 65 | $deflang = reset($langs); // picking the first one from the list with reset since the keys are not numeric |
66 | 66 | if (sizeof($langs) > 1) { |
67 | - trigger_error("Default language for vocabulary '" . $this->getShortName() . "' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
67 | + trigger_error("Default language for vocabulary '".$this->getShortName()."' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | return $deflang; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | return $lname; |
105 | 105 | } |
106 | 106 | // already a full URI |
107 | - return $this->getUriSpace() . $lname; |
|
107 | + return $this->getUriSpace().$lname; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | foreach ($conceptscheme->allLiterals($prop, null) as $val) { |
166 | 166 | $prop = (substr($prop, 0, 5) == 'dc11:') ? str_replace('dc11:', 'dc:', $prop) : $prop; |
167 | 167 | if ($val->getValue() instanceof DateTime) { |
168 | - $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang) . ' ' . Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang); |
|
168 | + $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang).' '.Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang); |
|
169 | 169 | } |
170 | 170 | $ret[$prop][] = $val; |
171 | 171 | } |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | } |
287 | 287 | // don't know how to parse |
288 | 288 | $rev = $parts[2]; |
289 | - $datestr = $parts[3] . ' ' . $parts[4]; |
|
289 | + $datestr = $parts[3].' '.$parts[4]; |
|
290 | 290 | |
291 | 291 | return "$datestr (r$rev)"; |
292 | 292 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | * Counts the statistics of the vocabulary. |
296 | 296 | * @return array of the concept/group counts |
297 | 297 | */ |
298 | - public function getStatistics($lang = '', $array=null, $group=null) |
|
298 | + public function getStatistics($lang = '', $array = null, $group = null) |
|
299 | 299 | { |
300 | 300 | $sparql = $this->getSparql(); |
301 | 301 | // find the number of concepts |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | return $this->getSparql()->queryChangeList($clang, $offset, $prop); |
615 | 615 | } |
616 | 616 | |
617 | - public function getTitle($lang=null) { |
|
617 | + public function getTitle($lang = null) { |
|
618 | 618 | return $this->config->getTitle($lang); |
619 | 619 | } |
620 | 620 |
@@ -156,18 +156,18 @@ discard block |
||
156 | 156 | $localname = $vocab->getLocalName($uri); |
157 | 157 | if ($localname !== $uri && $localname === urlencode($localname)) { |
158 | 158 | // check that the prefix stripping worked, and there are no problematic chars in localname |
159 | - $paramstr = count($params) > 0 ? '?' . http_build_query($params) : ''; |
|
159 | + $paramstr = count($params) > 0 ? '?'.http_build_query($params) : ''; |
|
160 | 160 | if ($type && $type !== '' && $type !== 'vocab' && !($localname === '' && $type === 'page')) { |
161 | - return "$vocid/$lang/$type/$localname" . $paramstr; |
|
161 | + return "$vocid/$lang/$type/$localname".$paramstr; |
|
162 | 162 | } |
163 | 163 | |
164 | - return "$vocid/$lang/$localname" . $paramstr; |
|
164 | + return "$vocid/$lang/$localname".$paramstr; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | // case 2: URI outside vocabulary namespace, or has problematic chars |
168 | 168 | // pass the full URI as parameter instead |
169 | 169 | $params['uri'] = $uri; |
170 | - return "$vocid/$lang/$type/?" . http_build_query($params); |
|
170 | + return "$vocid/$lang/$type/?".http_build_query($params); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | { |
294 | 294 | if ($modifiedDate) { |
295 | 295 | $ifModifiedSince = $this->getIfModifiedSince(); |
296 | - $this->sendHeader("Last-Modified: " . $modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
296 | + $this->sendHeader("Last-Modified: ".$modifiedDate->format('D, d M Y H:i:s \G\M\T')); |
|
297 | 297 | if ($ifModifiedSince !== null && $ifModifiedSince >= $modifiedDate) { |
298 | 298 | $this->sendHeader("HTTP/1.0 304 Not Modified"); |
299 | 299 | return true; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | // wrap with JSONP callback if requested |
26 | 26 | if (filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_STRING)) { |
27 | 27 | header("Content-type: application/javascript; charset=utf-8"); |
28 | - echo filter_input(INPUT_GET, 'callback', FILTER_UNSAFE_RAW) . "(" . json_encode($data) . ");"; |
|
28 | + echo filter_input(INPUT_GET, 'callback', FILTER_UNSAFE_RAW)."(".json_encode($data).");"; |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
@@ -88,7 +88,7 @@ discard block |
||
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, |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | // convert to vocids array to support multi-vocabulary search |
106 | 106 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : array(); |
107 | 107 | $vocabObjects = array(); |
108 | - foreach($vocids as $vocid) { |
|
108 | + foreach ($vocids as $vocid) { |
|
109 | 109 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
110 | 110 | } |
111 | 111 | $parameters->setVocabularies($vocabObjects); |
@@ -136,12 +136,12 @@ discard block |
||
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 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | if ($request->getQueryParam('labellang')) { |
161 | 161 | $ret['@context']['@language'] = $request->getQueryParam('labellang'); |
162 | 162 | } elseif ($request->getQueryParam('lang')) { |
163 | - $ret['@context']['@language'] = $request->getQueryParam('lang');; |
|
163 | + $ret['@context']['@language'] = $request->getQueryParam('lang'); ; |
|
164 | 164 | } |
165 | 165 | return $ret; |
166 | 166 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | 'prefLabel' => 'skos:prefLabel', |
230 | 230 | 'title' => 'dct:title', |
231 | 231 | '@language' => $request->getLang(), |
232 | - '@base' => $this->getBaseHref() . "rest/v1/" . $vocab->getId() . "/", |
|
232 | + '@base' => $this->getBaseHref()."rest/v1/".$vocab->getId()."/", |
|
233 | 233 | ), |
234 | 234 | 'uri' => '', |
235 | 235 | 'id' => $vocab->getId(), |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | 'subTypes' => array('@id' => 'void:class', '@type' => '@id'), |
284 | 284 | 'count' => 'void:entities', |
285 | 285 | '@language' => $request->getLang(), |
286 | - '@base' => $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/", |
|
286 | + '@base' => $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/", |
|
287 | 287 | ), |
288 | 288 | 'uri' => '', |
289 | 289 | 'id' => $request->getVocab()->getId(), |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | 'language' => 'void-ext:language', |
361 | 361 | 'properties' => 'void:propertyPartition', |
362 | 362 | 'labels' => 'void:triples', |
363 | - '@base' => $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/", |
|
363 | + '@base' => $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/", |
|
364 | 364 | ), |
365 | 365 | 'uri' => '', |
366 | 366 | 'id' => $request->getVocab()->getId(), |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $types[] = $type; |
402 | 402 | } |
403 | 403 | |
404 | - $base = $request->getVocab() ? $this->getBaseHref() . "rest/v1/" . $request->getVocab()->getId() . "/" : $this->getBaseHref() . "rest/v1/"; |
|
404 | + $base = $request->getVocab() ? $this->getBaseHref()."rest/v1/".$request->getVocab()->getId()."/" : $this->getBaseHref()."rest/v1/"; |
|
405 | 405 | |
406 | 406 | $ret = array_merge_recursive($this->context, array( |
407 | 407 | '@context' => array( |
@@ -564,19 +564,19 @@ discard block |
||
564 | 564 | |
565 | 565 | $format = $this->negotiateFormat(array_keys($urls), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
566 | 566 | if (!$format) { |
567 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . implode(' ', array_keys($urls))); |
|
567 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".implode(' ', array_keys($urls))); |
|
568 | 568 | } |
569 | 569 | if (is_array($urls[$format])) { |
570 | 570 | $arr = $urls[$format]; |
571 | 571 | $dataLang = $request->getLang(); |
572 | 572 | if (isset($arr[$dataLang])) { |
573 | - header("Location: " . $arr[$dataLang]); |
|
573 | + header("Location: ".$arr[$dataLang]); |
|
574 | 574 | } else { |
575 | 575 | $vocid = $request->getVocab()->getId(); |
576 | 576 | return $this->returnError('404', 'Not Found', "No download source URL known for vocabulary $vocid in language $dataLang"); |
577 | 577 | } |
578 | 578 | } else { |
579 | - header("Location: " . $urls[$format]); |
|
579 | + header("Location: ".$urls[$format]); |
|
580 | 580 | } |
581 | 581 | } |
582 | 582 | |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | |
640 | 640 | $format = $this->negotiateFormat(explode(' ', self::SUPPORTED_FORMATS), $request->getServerConstant('HTTP_ACCEPT'), $request->getQueryParam('format')); |
641 | 641 | if (!$format) { |
642 | - return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: " . self::SUPPORTED_FORMATS); |
|
642 | + return $this->returnError(406, 'Not Acceptable', "Unsupported format. Supported MIME types are: ".self::SUPPORTED_FORMATS); |
|
643 | 643 | } |
644 | 644 | |
645 | 645 | $vocid = $vocab ? $vocab->getId() : null; |
@@ -924,7 +924,7 @@ discard block |
||
924 | 924 | } |
925 | 925 | } |
926 | 926 | // if the main concept scheme was not found, set 'top' to the first 'tops' (sorted alphabetically on the URIs) |
927 | - if (! isset($results[$uri]['top'])) { |
|
927 | + if (!isset($results[$uri]['top'])) { |
|
928 | 928 | $results[$uri]['top'] = $results[$uri]['tops'][0]; |
929 | 929 | } |
930 | 930 | } else { |
@@ -1089,25 +1089,25 @@ discard block |
||
1089 | 1089 | * @param Request $request |
1090 | 1090 | * @return object json-ld wrapped list of changed concepts |
1091 | 1091 | */ |
1092 | - private function changed($request, $prop='dc:created') |
|
1092 | + private function changed($request, $prop = 'dc:created') |
|
1093 | 1093 | { |
1094 | 1094 | $vocab = $request->getVocab(); |
1095 | 1095 | $offset = ($request->getQueryParam('offset') && is_numeric($request->getQueryParam('offset')) && $request->getQueryParam('offset') >= 0) ? $request->getQueryParam('offset') : 0; |
1096 | 1096 | $changeList = $vocab->getChangeList($prop, $request->getLang(), $offset); |
1097 | 1097 | |
1098 | 1098 | $simpleChangeList = array(); |
1099 | - foreach($changeList as $conceptInfo) { |
|
1099 | + foreach ($changeList as $conceptInfo) { |
|
1100 | 1100 | if (array_key_exists('date', $conceptInfo)) { |
1101 | - $simpleChangeList[] = array( 'uri' => $conceptInfo['uri'], |
|
1101 | + $simpleChangeList[] = array('uri' => $conceptInfo['uri'], |
|
1102 | 1102 | 'prefLabel' => $conceptInfo['prefLabel'], |
1103 | - 'date' => $conceptInfo['date']->format(DateTimeInterface::ISO8601) ); |
|
1103 | + 'date' => $conceptInfo['date']->format(DateTimeInterface::ISO8601)); |
|
1104 | 1104 | } |
1105 | 1105 | } |
1106 | 1106 | return $this->returnJson(array_merge_recursive($this->context, |
1107 | - array('@context' => array( '@language' => $request->getLang(), |
|
1107 | + array('@context' => array('@language' => $request->getLang(), |
|
1108 | 1108 | 'prefLabel' => 'skos:prefLabel', |
1109 | 1109 | 'xsd' => 'http://www.w3.org/2001/XMLSchema#', |
1110 | - 'date' => array( '@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#date') ) |
|
1110 | + 'date' => array('@id' => 'http://purl.org/dc/terms/date', '@type' => 'http://www.w3.org/2001/XMLSchema#date')) |
|
1111 | 1111 | ), |
1112 | 1112 | array('changeList' => $simpleChangeList))); |
1113 | 1113 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // specify where to look for templates and cache |
38 | 38 | $loader = new Twig_Loader_Filesystem('view'); |
39 | 39 | // initialize Twig environment |
40 | - $this->twig = new Twig_Environment($loader, array('cache' => $tmpDir,'auto_reload' => true)); |
|
40 | + $this->twig = new Twig_Environment($loader, array('cache' => $tmpDir, 'auto_reload' => true)); |
|
41 | 41 | $this->twig->addExtension(new Twig_Extensions_Extension_I18n()); |
42 | 42 | // used for setting the base href for the relative urls |
43 | 43 | $this->twig->addGlobal("BaseHref", $this->getBaseHref()); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $this->twig->addFilter(new Twig_SimpleFilter('link_url', array($this, 'linkUrlFilter'))); |
61 | 61 | |
62 | 62 | // register a Twig filter for generating strings from language codes with CLDR |
63 | - $langFilter = new Twig_SimpleFilter('lang_name', function ($langcode, $lang) { |
|
63 | + $langFilter = new Twig_SimpleFilter('lang_name', function($langcode, $lang) { |
|
64 | 64 | return Language::getName($langcode, $lang); |
65 | 65 | }); |
66 | 66 | $this->twig->addFilter($langFilter); |
@@ -237,17 +237,17 @@ discard block |
||
237 | 237 | |
238 | 238 | private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) |
239 | 239 | { |
240 | - $headers = "MIME-Version: 1.0" . "\r\n"; |
|
241 | - $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n"; |
|
240 | + $headers = "MIME-Version: 1.0"."\r\n"; |
|
241 | + $headers .= "Content-type: text/html; charset=UTF-8"."\r\n"; |
|
242 | 242 | if (!empty($toMail)) { |
243 | - $headers .= "Cc: " . $this->model->getConfig()->getFeedbackAddress() . "\r\n"; |
|
243 | + $headers .= "Cc: ".$this->model->getConfig()->getFeedbackAddress()."\r\n"; |
|
244 | 244 | } |
245 | 245 | if (!empty($fromEmail)) { |
246 | 246 | $headers .= "Reply-To: $fromName <$fromEmail>\r\n"; |
247 | 247 | } |
248 | 248 | |
249 | 249 | $service = $this->model->getConfig()->getServiceName(); |
250 | - return $headers . "From: $fromName via $service <$sender>"; |
|
250 | + return $headers."From: $fromName via $service <$sender>"; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | { |
262 | 262 | $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); |
263 | 263 | if ($fromVocab !== null && $fromVocab !== '') { |
264 | - $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "<br />" . $message; |
|
264 | + $message = 'Feedback from vocab: '.strtoupper($fromVocab)."<br />".$message; |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender(); |
268 | - $subject = $this->model->getConfig()->getServiceName() . " feedback"; |
|
268 | + $subject = $this->model->getConfig()->getServiceName()." feedback"; |
|
269 | 269 | // determine the sender address of the message |
270 | 270 | $sender = $this->model->getConfig()->getFeedbackSender(); |
271 | 271 | if (empty($sender)) $sender = $envelopeSender; |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; |
279 | 279 | |
280 | 280 | // adding some information about the user for debugging purposes. |
281 | - $message = $message . "<br /><br /> Debugging information:" |
|
282 | - . "<br />Timestamp: " . date(DATE_RFC2822) |
|
283 | - . "<br />User agent: " . $request->getServerConstant('HTTP_USER_AGENT') |
|
284 | - . "<br />Referer: " . $request->getServerConstant('HTTP_REFERER'); |
|
281 | + $message = $message."<br /><br /> Debugging information:" |
|
282 | + . "<br />Timestamp: ".date(DATE_RFC2822) |
|
283 | + . "<br />User agent: ".$request->getServerConstant('HTTP_USER_AGENT') |
|
284 | + . "<br />Referer: ".$request->getServerConstant('HTTP_REFERER'); |
|
285 | 285 | |
286 | 286 | try { |
287 | 287 | mail($toAddress, $subject, $message, $headers, $params); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | header("HTTP/1.0 404 Not Found"); |
290 | 290 | $template = $this->twig->loadTemplate('error-page.twig'); |
291 | 291 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
292 | - error_log('Caught exception: ' . $e->getMessage()); |
|
292 | + error_log('Caught exception: '.$e->getMessage()); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | echo $template->render( |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : null; |
337 | 337 | $vocabObjects = array(); |
338 | 338 | if ($vocids) { |
339 | - foreach($vocids as $vocid) { |
|
339 | + foreach ($vocids as $vocid) { |
|
340 | 340 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
341 | 341 | } |
342 | 342 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | } catch (Exception $e) { |
348 | 348 | header("HTTP/1.0 404 Not Found"); |
349 | 349 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
350 | - error_log('Caught exception: ' . $e->getMessage()); |
|
350 | + error_log('Caught exception: '.$e->getMessage()); |
|
351 | 351 | } |
352 | 352 | $this->invokeGenericErrorPage($request, $e->getMessage()); |
353 | 353 | return; |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | 'search_count' => $counts, |
364 | 364 | 'languages' => $this->languages, |
365 | 365 | 'search_results' => $searchResults, |
366 | - 'rest' => $parameters->getOffset()>0, |
|
366 | + 'rest' => $parameters->getOffset() > 0, |
|
367 | 367 | 'global_search' => true, |
368 | 368 | 'term' => $request->getQueryParamRaw('q'), |
369 | 369 | 'lang_list' => $langList, |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | } catch (Exception $e) { |
389 | 389 | header("HTTP/1.0 404 Not Found"); |
390 | 390 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
391 | - error_log('Caught exception: ' . $e->getMessage()); |
|
391 | + error_log('Caught exception: '.$e->getMessage()); |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | echo $template->render( |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | } catch (Exception $e) { |
410 | 410 | header("HTTP/1.0 404 Not Found"); |
411 | 411 | if ($this->model->getConfig()->getLogCaughtExceptions()) { |
412 | - error_log('Caught exception: ' . $e->getMessage()); |
|
412 | + error_log('Caught exception: '.$e->getMessage()); |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | echo $template->render( |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | 'vocab' => $vocab, |
427 | 427 | 'search_results' => $searchResults, |
428 | 428 | 'search_count' => $counts, |
429 | - 'rest' => $parameters->getOffset()>0, |
|
429 | + 'rest' => $parameters->getOffset() > 0, |
|
430 | 430 | 'limit_parent' => $parameters->getParentLimit(), |
431 | 431 | 'limit_type' => $request->getQueryParam('type') ? explode('+', $request->getQueryParam('type')) : null, |
432 | 432 | 'limit_group' => $parameters->getGroupLimit(), |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | * Loads and renders the view containing a list of recent changes in the vocabulary. |
558 | 558 | * @param Request $request |
559 | 559 | */ |
560 | - public function invokeChangeList($request, $prop='dc:created') |
|
560 | + public function invokeChangeList($request, $prop = 'dc:created') |
|
561 | 561 | { |
562 | 562 | $bydate = $this->formatChangeList($request, $prop); |
563 | 563 | |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | ); |
575 | 575 | } |
576 | 576 | |
577 | - public function formatChangeList($request, $prop='dc:created') { |
|
577 | + public function formatChangeList($request, $prop = 'dc:created') { |
|
578 | 578 | // set language parameters for gettext |
579 | 579 | $this->setLanguageProperties($request->getLang()); |
580 | 580 | $vocab = $request->getVocab(); |
@@ -582,9 +582,9 @@ discard block |
||
582 | 582 | $changeList = $vocab->getChangeList($prop, $request->getContentLang(), $offset); |
583 | 583 | |
584 | 584 | $formatByDate = array(); |
585 | - foreach($changeList as $concept) { |
|
585 | + foreach ($changeList as $concept) { |
|
586 | 586 | $concept['datestring'] = Punic\Calendar::formatDate($concept['date'], 'medium', $request->getLang()); |
587 | - $formatByDate[Punic\Calendar::getMonthName($concept['date'], 'wide', $request->getLang(), true) . Punic\Calendar::format($concept['date'], ' y', $request->getLang()) ][strtolower($concept['prefLabel'])] = $concept; |
|
587 | + $formatByDate[Punic\Calendar::getMonthName($concept['date'], 'wide', $request->getLang(), true).Punic\Calendar::format($concept['date'], ' y', $request->getLang())][strtolower($concept['prefLabel'])] = $concept; |
|
588 | 588 | } |
589 | 589 | return $formatByDate; |
590 | 590 | } |