Passed
Pull Request — master (#1205)
by Osma
04:18
created
model/ConceptPropertyValue.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
                 }
54 54
                 // We need to check all the labels in case one of them matches a subtag of the current language
55 55
                 if ($this->resource->allLiterals('skos:prefLabel')) {
56
-                    foreach($this->resource->allLiterals('skos:prefLabel') as $label) {
56
+                    foreach ($this->resource->allLiterals('skos:prefLabel') as $label) {
57 57
                         // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language
58
-                        if ($label !== null && strpos($label->getLang(), $fallback . '-') === 0) {
58
+                        if ($label !== null && strpos($label->getLang(), $fallback.'-') === 0) {
59 59
                             return EasyRdf\Literal::create($label, $fallback);
60 60
                         }
61 61
                     }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function getReifiedPropertyValues() {
157 157
         $ret = array();
158 158
         $props = $this->resource->propertyUris();
159
-        foreach($props as $prop) {
159
+        foreach ($props as $prop) {
160 160
             $prop = (EasyRdf\RdfNamespace::shorten($prop) !== null) ? EasyRdf\RdfNamespace::shorten($prop) : $prop;
161 161
             foreach ($this->resource->allLiterals($prop) as $val) {
162 162
                 if ($prop !== 'rdf:value') { // shown elsewhere
Please login to merge, or discard this patch.
model/ConceptProperty.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -125,11 +125,9 @@  discard block
 block discarded – undo
125 125
                             return strcoll(strtolower($a->getLabel()), strtolower($b->getLabel()));
126 126
                         }
127 127
                         return 1;
128
-                    }
129
-                    else if ($bnot == null) {
128
+                    } else if ($bnot == null) {
130 129
                         return -1;
131
-                    }
132
-                    else {
130
+                    } else {
133 131
                         // assume that notations are unique, choose strategy
134 132
                         if ($this->sort_by_notation == "lexical") {
135 133
                             return strcoll($anot, $bnot);
@@ -138,8 +136,7 @@  discard block
 block discarded – undo
138 136
                         }
139 137
                     }
140 138
                 });
141
-            }
142
-            else {
139
+            } else {
143 140
                 uasort($this->values, function($a, $b) {
144 141
                     // assume that labels are unique
145 142
                     return strcoll(strtolower($a->getLabel()), strtolower($b->getLabel()));
Please login to merge, or discard this patch.