Completed
Push — master ( 0ff454...f90a78 )
by Henri
07:50 queued 13s
created
rest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2012 Aalto University and University of Helsinki
4
- * MIT License
5
- * see LICENSE.txt for more information
6
- */
3
+     * Copyright (c) 2012 Aalto University and University of Helsinki
4
+     * MIT License
5
+     * see LICENSE.txt for more information
6
+     */
7 7
 
8 8
 /**
9 9
  * Includes the side wide settings.
Please login to merge, or discard this patch.
model/Request.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,9 +167,11 @@
 block discarded – undo
167 167
      */
168 168
     public function setVocab($vocabid)
169 169
     {
170
-        if (strpos($vocabid, ' ') !== false) // if there are multiple vocabularies just storing the string
170
+        if (strpos($vocabid, ' ') !== false) {
171
+          // if there are multiple vocabularies just storing the string
171 172
         {
172 173
             $this->setVocabids($vocabid);
174
+        }
173 175
         } else {
174 176
             $this->vocab = $this->model->getVocabulary($vocabid);
175 177
         }
Please login to merge, or discard this patch.
model/Concept.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -461,7 +461,7 @@
 block discarded – undo
461 461
             }
462 462
         } catch (Exception $e) {
463 463
             trigger_error($e->getMessage(), E_USER_WARNING);
464
-            return gettext('skosmos:modified') . ' ' . (string) $this->resource->get('dc:modified') . ' ' . gettext('skosmos:created') . ' ' . (string) $this->resource->get('dc:created');
464
+            return gettext('skosmos:modified') . ' ' . (string)$this->resource->get('dc:modified') . ' ' . gettext('skosmos:created') . ' ' . (string)$this->resource->get('dc:created');
465 465
         }
466 466
         return $ret;
467 467
     }
Please login to merge, or discard this patch.
model/sparql/JenaTextSparql.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
- * MIT License
5
- * see LICENSE.txt for more information
6
- */
3
+     * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
+     * MIT License
5
+     * see LICENSE.txt for more information
6
+     */
7 7
 
8 8
 /* Register text: namespace needed for jena-text queries */
9 9
 EasyRdf_Namespace::set('text', 'http://jena.apache.org/text#');
Please login to merge, or discard this patch.
model/ConceptPropertyValueLiteral.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                 return Punic\Calendar::formatDate($val, 'short');
45 45
             } catch (Exception $e) {
46 46
                 trigger_error($e->getMessage(), E_USER_WARNING);
47
-                return (string) $this->literal;
47
+                return (string)$this->literal;
48 48
             }
49 49
         }
50 50
         return $this->literal->getValue();
Please login to merge, or discard this patch.
model/DataObject.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,10 +72,12 @@
 block discarded – undo
72 72
 
73 73
         uksort($sortable, array($this, 'mycompare'));
74 74
         foreach ($sortable as $prop => $vals) {
75
-            if (is_array($prop)) // the ConceptProperty objects have their own sorting methods
75
+            if (is_array($prop)) {
76
+              // the ConceptProperty objects have their own sorting methods
76 77
             {
77 78
                 ksort($sortable[$prop]);
78 79
             }
80
+            }
79 81
 
80 82
         }
81 83
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
- * MIT License
5
- * see LICENSE.txt for more information
6
- */
3
+     * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
+     * MIT License
5
+     * see LICENSE.txt for more information
6
+     */
7 7
 
8 8
 /**
9 9
  * Dataobject wraps EasyRdf resources and provides access to the data.
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function getEnvLang()    
120 120
     {
121
-       // get language from locale, same as used by gettext, set by Controller
122
-       return substr(getenv("LC_ALL"), 0, 2);
121
+        // get language from locale, same as used by gettext, set by Controller
122
+        return substr(getenv("LC_ALL"), 0, 2);
123 123
     }
124 124
 }
Please login to merge, or discard this patch.
model/VocabularyCategory.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
- * MIT License
5
- * see LICENSE.txt for more information
6
- */
3
+     * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
+     * MIT License
5
+     * see LICENSE.txt for more information
6
+     */
7 7
 
8 8
 /* Register text: namespace needed for jena-text queries */
9 9
 EasyRdf_Namespace::set('text', 'http://jena.apache.org/text#');
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@
 block discarded – undo
10 10
  */
11 11
 class VocabularyCategory extends DataObject
12 12
 {
13
+    /**
14
+     * @param Model $model
15
+     */
13 16
     public function __construct($model, $resource)
14 17
     {
15 18
         if (!($model instanceof Model)) {
Please login to merge, or discard this patch.
model/Vocabulary.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,10 +76,12 @@
 block discarded – undo
76 76
      */
77 77
     public function getUriSpace()
78 78
     {
79
-        if ($this->urispace === null) // initialize cache
79
+        if ($this->urispace === null) {
80
+          // initialize cache
80 81
         {
81 82
             $this->urispace = $this->resource->getLiteral('void:uriSpace')->getValue();
82 83
         }
84
+        }
83 85
 
84 86
         return $this->urispace;
85 87
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      * Counts the statistics of the vocabulary.
279 279
      * @return array of the concept/group counts
280 280
      */
281
-    public function getStatistics($lang = '', $array=null, $group=null)
281
+    public function getStatistics($lang = '', $array = null, $group = null)
282 282
     {
283 283
         $sparql = $this->getSparql();
284 284
         // find the number of concepts
@@ -594,14 +594,14 @@  discard block
 block discarded – undo
594 594
     {
595 595
       $changelist = $this->getSparql()->queryChangeList($clang, $offset, $prop);
596 596
       $bydate = array();
597
-      foreach($changelist as $concept) {
597
+      foreach ($changelist as $concept) {
598 598
         $concept['datestring'] = Punic\Calendar::formatDate($concept['date'], 'medium', $lang);
599
-        $bydate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true) . Punic\Calendar::format($concept['date'], ' y', $lang) ][strtolower($concept['prefLabel'])] = $concept;
599
+        $bydate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true) . Punic\Calendar::format($concept['date'], ' y', $lang)][strtolower($concept['prefLabel'])] = $concept;
600 600
       }
601 601
       return $bydate;
602 602
     }
603 603
 
604
-    public function getTitle($lang=null) {
604
+    public function getTitle($lang = null) {
605 605
       return $this->config->getTitle($lang);
606 606
     }
607 607
     
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
- * MIT License
5
- * see LICENSE.txt for more information
6
- */
3
+     * Copyright (c) 2012-2013 Aalto University and University of Helsinki
4
+     * MIT License
5
+     * see LICENSE.txt for more information
6
+     */
7 7
 
8 8
 /* Register text: namespace needed for jena-text queries */
9 9
 EasyRdf_Namespace::set('text', 'http://jena.apache.org/text#');
Please login to merge, or discard this patch.
model/VocabularyConfig.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      * @param string $property the property to query
31 31
      * @param string $lang preferred language for the literal,
32 32
      */
33
-    private function getLiteral($property, $lang=null)
33
+    private function getLiteral($property, $lang = null)
34 34
     {
35 35
         if (!isset($lang)) {;
36 36
             $lang = $this->getEnvLang();
Please login to merge, or discard this patch.
Braces   +15 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,8 +43,9 @@  discard block
 block discarded – undo
43 43
 
44 44
         // not found with selected language, try any language
45 45
         $literal = $this->resource->getLiteral($property);
46
-        if ($literal)
47
-          return $literal->getValue();
46
+        if ($literal) {
47
+                  return $literal->getValue();
48
+        }
48 49
     }
49 50
 
50 51
     /**
@@ -85,8 +86,9 @@  discard block
 block discarded – undo
85 86
     public function getShortName()
86 87
     {
87 88
         $shortname = $this->getLiteral('skosmos:shortName');
88
-        if ($shortname) 
89
-          return $shortname;
89
+        if ($shortname) {
90
+                  return $shortname;
91
+        }
90 92
 
91 93
         // if no shortname exists fall back to the id
92 94
         return $this->getId();
@@ -205,10 +207,12 @@  discard block
 block discarded – undo
205 207
         $ret = array();
206 208
         foreach ($resources as $res) {
207 209
             $prop = $res->getURI();
208
-            if (EasyRdf_Namespace::shorten($prop) !== null) // shortening property labels if possible
210
+            if (EasyRdf_Namespace::shorten($prop) !== null) {
211
+              // shortening property labels if possible
209 212
             {
210 213
                 $prop = EasyRdf_Namespace::shorten($prop);
211 214
             }
215
+            }
212 216
 
213 217
             $ret[] = $prop;
214 218
         }
@@ -225,10 +229,12 @@  discard block
 block discarded – undo
225 229
         $resources = $this->resource->allResources("skosmos:hasMultiLingualProperty");
226 230
         foreach ($resources as $res) {
227 231
             $prop = $res->getURI();
228
-            if (EasyRdf_Namespace::shorten($prop) !== null) // shortening property labels if possible
232
+            if (EasyRdf_Namespace::shorten($prop) !== null) {
233
+              // shortening property labels if possible
229 234
             {
230 235
                 $prop = EasyRdf_Namespace::shorten($prop);
231 236
             }
237
+            }
232 238
 
233 239
             if ($prop === $property) {
234 240
                 return true;
@@ -329,11 +335,12 @@  discard block
 block discarded – undo
329 335
     public function getId()
330 336
     {
331 337
         $uriparts = explode("#", $this->resource->getURI());
332
-        if (count($uriparts) != 1)
333
-        // hash namespace
338
+        if (count($uriparts) != 1) {
339
+                // hash namespace
334 340
         {
335 341
             return $uriparts[1];
336 342
         }
343
+        }
337 344
 
338 345
         // slash namespace
339 346
         $uriparts = explode("/", $this->resource->getURI());
Please login to merge, or discard this patch.