Completed
Pull Request — master (#419)
by Dan Michael O.
03:19 queued 34s
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/Model.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -381,10 +381,12 @@
 block discarded – undo
381 381
                 // register vocabulary ids as RDF namespace prefixes
382 382
                 $prefix = preg_replace('/\W+/', '', $voc->getId()); // strip non-word characters
383 383
                 try {
384
-                    if ($prefix != '' && EasyRdf_Namespace::get($prefix) === null) // if not already defined
384
+                    if ($prefix != '' && EasyRdf_Namespace::get($prefix) === null) {
385
+                      // if not already defined
385 386
                     {
386 387
                         EasyRdf_Namespace::set($prefix, $voc->getUriSpace());
387 388
                     }
389
+                    }
388 390
 
389 391
                 } catch (Exception $e) {
390 392
                     // not valid as namespace identifier, ignore
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 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 2 patches
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.
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/sparql/GenericSparql.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,12 +56,16 @@  discard block
 block discarded – undo
56 56
         $this->model = $model;
57 57
 
58 58
         // set graphClause so that it can be used by all queries
59
-        if ($this->isDefaultEndpoint()) // default endpoint; query any graph (and catch it in a variable)
59
+        if ($this->isDefaultEndpoint()) {
60
+          // default endpoint; query any graph (and catch it in a variable)
60 61
         {
61 62
             $this->graphClause = "GRAPH $graph";
62
-        } elseif ($graph) // query a specific graph
63
+        }
64
+        } elseif ($graph) {
65
+          // query a specific graph
63 66
         {
64 67
             $this->graphClause = "GRAPH <$graph>";
68
+        }
65 69
         } else // query the default graph
66 70
         {
67 71
             $this->graphClause = "";
@@ -616,9 +620,11 @@  discard block
 block discarded – undo
616 620
         // extra types to query, if using thesaurus arrays and no additional type restrictions have been applied
617 621
         $extratypes = ($arrayClass && $types === array('skos:Concept')) ? "UNION { ?s a <$arrayClass> }" : "";
618 622
 
619
-        if (sizeof($unprefixed_types) === 1) // if only one type limitation set no UNION needed
623
+        if (sizeof($unprefixed_types) === 1) {
624
+          // if only one type limitation set no UNION needed
620 625
         {
621 626
             $type = '<' . $unprefixed_types[0] . '>';
627
+        }
622 628
         } else { // multiple type limitations require setting a UNION for each of those
623 629
             $type = '[]';
624 630
             foreach ($unprefixed_types as $utype) {
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,6 +140,7 @@  discard block
 block discarded – undo
140 140
     /**
141 141
      * @param array $langs Languages to query for
142 142
      * @param string[] $props property names
143
+     * @return string
143 144
      */
144 145
     private function generateCountLangConceptsQuery($langs, $classes, $props) {
145 146
         $gc = $this->graphClause;
@@ -578,7 +579,7 @@  discard block
 block discarded – undo
578 579
 
579 580
     /**
580 581
      * Generate a VALUES clause for limiting the targeted graphs.
581
-     * @param array $vocabs array of Vocabulary objects to target
582
+     * @param Vocabulary[] $vocabs array of Vocabulary objects to target
582 583
      * @return string VALUES clause, or "" if not necessary to limit
583 584
      */
584 585
     protected function formatValuesGraph($vocabs) {
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 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.