@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | $label = is_string($this->getLabel()) ? $this->getLabel() : $this->getLabel()->getValue(); |
26 | 26 | if ($this->vocab->getConfig()->sortByNotation()) { |
27 | - $label = ltrim($this->getNotation() . ' ') . $label; |
|
27 | + $label = ltrim($this->getNotation().' ').$label; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | return $label; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | } |
48 | 48 | // We need to check all the labels in case one of them matches a subtag of the current language |
49 | 49 | if ($this->resource->allLiterals('skos:prefLabel')) { |
50 | - foreach($this->resource->allLiterals('skos:prefLabel') as $label) { |
|
50 | + foreach ($this->resource->allLiterals('skos:prefLabel') as $label) { |
|
51 | 51 | // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language |
52 | - if ($label !== null && strpos($label->getLang(), $fallback . '-') === 0) { |
|
52 | + if ($label !== null && strpos($label->getLang(), $fallback.'-') === 0) { |
|
53 | 53 | return EasyRdf\Literal::create($label, $fallback); |
54 | 54 | } |
55 | 55 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | public function getReifiedPropertyValues() { |
142 | 142 | $ret = array(); |
143 | 143 | $props = $this->resource->propertyUris(); |
144 | - foreach($props as $prop) { |
|
144 | + foreach ($props as $prop) { |
|
145 | 145 | $prop = (EasyRdf\RdfNamespace::shorten($prop) !== null) ? EasyRdf\RdfNamespace::shorten($prop) : $prop; |
146 | 146 | foreach ($this->resource->allLiterals($prop) as $val) { |
147 | 147 | if ($prop !== 'rdf:value') { // shown elsewhere |
@@ -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() |
@@ -178,14 +178,14 @@ discard block |
||
178 | 178 | 'from' => [ |
179 | 179 | 'memberSet' => [ |
180 | 180 | [ |
181 | - 'uri' => (string) $this->source->getUri(), |
|
181 | + 'uri' => (string)$this->source->getUri(), |
|
182 | 182 | ] |
183 | 183 | ] |
184 | 184 | ], |
185 | 185 | 'to' => [ |
186 | 186 | 'memberSet' => [ |
187 | 187 | [ |
188 | - 'uri' => (string) $this->getUri() |
|
188 | + 'uri' => (string)$this->getUri() |
|
189 | 189 | ] |
190 | 190 | ] |
191 | 191 | ] |
@@ -194,20 +194,20 @@ discard block |
||
194 | 194 | $fromScheme = $this->vocab->getDefaultConceptScheme(); |
195 | 195 | if (isset($fromScheme)) { |
196 | 196 | $ret['fromScheme'] = [ |
197 | - 'uri' => (string) $fromScheme, |
|
197 | + 'uri' => (string)$fromScheme, |
|
198 | 198 | ]; |
199 | 199 | } |
200 | 200 | |
201 | 201 | $exvocab = $this->getExvocab(); |
202 | 202 | if (isset($exvocab)) { |
203 | 203 | $ret['toScheme'] = [ |
204 | - 'uri' => (string) $exvocab->getDefaultConceptScheme(), |
|
204 | + 'uri' => (string)$exvocab->getDefaultConceptScheme(), |
|
205 | 205 | ]; |
206 | 206 | } |
207 | 207 | |
208 | 208 | $notation = $this->getNotation(); |
209 | 209 | if (isset($notation)) { |
210 | - $ret['to']['memberSet'][0]['notation'] = (string) $notation; |
|
210 | + $ret['to']['memberSet'][0]['notation'] = (string)$notation; |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | $label = $this->getLabel(null, $queryExVocabs); |
@@ -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() . ' ' . $value->getUri()] = $value; |
|
83 | + $this->values[ltrim($value->getNotation().' ').$value->getLabel().' '.$value->getUri()] = $value; |
|
84 | 84 | $this->is_sorted = false; |
85 | 85 | } |
86 | 86 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | { |
89 | 89 | if (!empty($this->values)) { |
90 | 90 | uksort($this->values, function($a, $b) { |
91 | - return $this->sort_by_notation ? strnatcasecmp($a, $b) : strcoll(strtolower($a),strtolower($b)); |
|
91 | + return $this->sort_by_notation ? strnatcasecmp($a, $b) : strcoll(strtolower($a), strtolower($b)); |
|
92 | 92 | }); |
93 | 93 | } |
94 | 94 | $this->is_sorted = true; |