Completed
Push — master ( 8d8e17...15a118 )
by Henri
03:06
created
model/Concept.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 
122 122
         // 3. label in a subtag of the current language
123 123
         // We need to check all the labels in case one of them matches a subtag of the current language
124
-        foreach($this->resource->allLiterals('skos:prefLabel') as $label) {
124
+        foreach ($this->resource->allLiterals('skos:prefLabel') as $label) {
125 125
             // the label lang code is a subtag of the UI lang eg. en-GB - create a new literal with the main language
126
-            if ($label !== null && strpos($label->getLang(), $lang . '-') === 0) {
126
+            if ($label !== null && strpos($label->getLang(), $lang.'-') === 0) {
127 127
                 return EasyRdf_Literal::create($label, $lang);
128 128
             }
129 129
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         // 4. label in any language, including literal with empty language tag
132 132
         $label = $this->resource->label();
133 133
         if ($label !== null) {
134
-            return $label->getLang() ? $label->getValue() . " (" . $label->getLang() . ")" : $label->getValue();
134
+            return $label->getLang() ? $label->getValue()." (".$label->getLang().")" : $label->getValue();
135 135
         }
136 136
 
137 137
         // empty
@@ -462,14 +462,14 @@  discard block
 block discarded – undo
462 462
 
463 463
             // making a human readable string from the timestamps
464 464
             if ($created != '') {
465
-                $ret = gettext('skosmos:created') . ' ' . (Punic\Calendar::formatDate($created, 'short'));
465
+                $ret = gettext('skosmos:created').' '.(Punic\Calendar::formatDate($created, 'short'));
466 466
             }
467 467
 
468 468
             if ($modified != '') {
469 469
                 if ($created != '') {
470
-                    $ret .= ', ' . gettext('skosmos:modified') . ' ' . (Punic\Calendar::formatDate($modified, 'short'));
470
+                    $ret .= ', '.gettext('skosmos:modified').' '.(Punic\Calendar::formatDate($modified, 'short'));
471 471
                 } else {
472
-                    $ret .= ' ' . ucfirst(gettext('skosmos:modified')) . ' ' . (Punic\Calendar::formatDate($modified, 'short'));
472
+                    $ret .= ' '.ucfirst(gettext('skosmos:modified')).' '.(Punic\Calendar::formatDate($modified, 'short'));
473 473
                 }
474 474
 
475 475
             }
@@ -477,12 +477,12 @@  discard block
 block discarded – undo
477 477
             trigger_error($e->getMessage(), E_USER_WARNING);
478 478
             $ret = '';
479 479
             if ($this->resource->get('dc:modified')) {
480
-                $modified = (string) $this->resource->get('dc:modified');
481
-                $ret = gettext('skosmos:modified') . ' ' . $modified; 
480
+                $modified = (string)$this->resource->get('dc:modified');
481
+                $ret = gettext('skosmos:modified').' '.$modified; 
482 482
             }
483 483
             if ($this->resource->get('dc:created')) {
484
-                $created .= (string) $this->resource->get('dc:created');
485
-                $ret .= ' ' . gettext('skosmos:created') . ' ' . $created; 
484
+                $created .= (string)$this->resource->get('dc:created');
485
+                $ret .= ' '.gettext('skosmos:created').' '.$created; 
486 486
             }
487 487
         }
488 488
         return $ret;
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         $ret = array();
593 593
         foreach ($labels as $lit) {
594 594
             // filtering away subsets of the current language eg. en vs en-GB
595
-            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang() . '-') !== 0) {
595
+            if ($lit->getLang() != $this->clang && strpos($lit->getLang(), $this->getEnvLang().'-') !== 0) {
596 596
                 $prop = in_array($lit, $prefLabels) ? 'skos:prefLabel' : 'skos:altLabel'; 
597 597
                 $ret[$this->literalLanguageToString($lit)][] = new ConceptPropertyValueLiteral($lit, $prop);
598 598
             }
Please login to merge, or discard this patch.