Passed
Push — fix-tests-increase-httptimeout ( 2e642a )
by Osma
05:43
created
model/ConceptMappingPropertyValue.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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()
@@ -180,25 +180,25 @@  discard block
 block discarded – undo
180 180
             'from' => [
181 181
                 'memberSet' => [
182 182
                     [
183
-                        'uri' => (string) $this->source->getUri(),
183
+                        'uri' => (string)$this->source->getUri(),
184 184
                     ]
185 185
                 ]
186 186
             ],
187 187
             'to' => [
188 188
                 'memberSet' => [
189 189
                     [
190
-                        'uri' => (string) $this->getUri()
190
+                        'uri' => (string)$this->getUri()
191 191
                     ]
192 192
                 ]
193 193
             ],
194 194
             // EXTRA
195 195
             'hrefLink' => $hrefLink, // link to resource as displayed in the UI
196 196
             'lang' => $propertyLang, // TBD: could it be part of the prefLabel?
197
-            'vocabName' => (string) $this->getVocabName(), // vocabulary as displayed in the UI
197
+            'vocabName' => (string)$this->getVocabName(), // vocabulary as displayed in the UI
198 198
             'typeLabel' => gettext($this->type), // a text used in the UI instead of, for example, skos:closeMatch
199 199
         ];
200 200
 
201
-        $helpprop = $this->type . "_help";
201
+        $helpprop = $this->type."_help";
202 202
         // see if we have a translation for the property help text
203 203
         $help = gettext($helpprop);
204 204
         if ($help != $helpprop) {
@@ -208,20 +208,20 @@  discard block
 block discarded – undo
208 208
         $fromScheme = $this->vocab->getDefaultConceptScheme();
209 209
         if (isset($fromScheme)) {
210 210
             $ret['fromScheme'] = [
211
-                'uri' => (string) $fromScheme,
211
+                'uri' => (string)$fromScheme,
212 212
             ];
213 213
         }
214 214
 
215 215
         $exvocab = $this->getExvocab();
216 216
         if (isset($exvocab)) {
217 217
             $ret['toScheme'] = [
218
-                'uri' => (string) $exvocab->getDefaultConceptScheme(),
218
+                'uri' => (string)$exvocab->getDefaultConceptScheme(),
219 219
             ];
220 220
         }
221 221
 
222 222
         $notation = $this->getNotation();
223 223
         if (isset($notation)) {
224
-            $ret['to']['memberSet'][0]['notation'] = (string) $notation;
224
+            $ret['to']['memberSet'][0]['notation'] = (string)$notation;
225 225
         }
226 226
 
227 227
         $label = $this->getLabel($lang, $queryExVocabs);
Please login to merge, or discard this patch.
controller/Honeypot.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
     {
33 33
         // Encrypt the current time
34 34
         $honey_time_encrypted = $this->getEncryptedTime();
35
-        return '<div id="' . $honey_name . '_wrap" style="display:none;">' . "\r\n" .
36
-               '<input name="' . $honey_name . '" type="text" value="" id="' . $honey_name . '"/>' . "\r\n" .
37
-               '<input name="' . $honey_time . '" type="text" value="' . $honey_time_encrypted . '"/>' . "\r\n" .
35
+        return '<div id="'.$honey_name.'_wrap" style="display:none;">'."\r\n".
36
+               '<input name="'.$honey_name.'" type="text" value="" id="'.$honey_name.'"/>'."\r\n".
37
+               '<input name="'.$honey_time.'" type="text" value="'.$honey_time_encrypted.'"/>'."\r\n".
38 38
                 '</div>';
39 39
     }
40 40
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         // Get the decrypted time
67 67
         $value = $this->decryptTime($value);
68 68
         // The current time should be greater than the time the form was built + minimum
69
-        return ( is_numeric($value) && time() > ($value + $minDelta) );
69
+        return (is_numeric($value) && time() > ($value + $minDelta));
70 70
     }
71 71
     /**
72 72
      * Get encrypted time
Please login to merge, or discard this patch.
model/BaseConfig.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
      * @param string $lang preferred language for the literal
45 45
      * @return string string value for the given property, or the default value if not found
46 46
      */
47
-    protected function getLiteral($property, $default=null, $lang=null)
47
+    protected function getLiteral($property, $default = null, $lang = null)
48 48
     {
49 49
         if (!isset($lang)) {
50 50
             $lang = $this->getEnvLang();
Please login to merge, or discard this patch.
controller/WebController.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         // specify where to look for templates and cache
38 38
         $loader = new Twig_Loader_Filesystem('view');
39 39
         // initialize Twig environment
40
-        $this->twig = new Twig_Environment($loader, array('cache' => $tmpDir,'auto_reload' => true));
40
+        $this->twig = new Twig_Environment($loader, array('cache' => $tmpDir, 'auto_reload' => true));
41 41
         $this->twig->addExtension(new Twig_Extensions_Extension_I18n());
42 42
         // used for setting the base href for the relative urls
43 43
         $this->twig->addGlobal("BaseHref", $this->getBaseHref());
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $this->twig->addFilter(new Twig_SimpleFilter('link_url', array($this, 'linkUrlFilter')));
61 61
 
62 62
         // register a Twig filter for generating strings from language codes with CLDR
63
-        $langFilter = new Twig_SimpleFilter('lang_name', function ($langcode, $lang) {
63
+        $langFilter = new Twig_SimpleFilter('lang_name', function($langcode, $lang) {
64 64
             return Language::getName($langcode, $lang);
65 65
         });
66 66
         $this->twig->addFilter($langFilter);
@@ -234,16 +234,16 @@  discard block
 block discarded – undo
234 234
 
235 235
     private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender)
236 236
     {
237
-        $headers = "MIME-Version: 1.0" . "\r\n";
238
-        $headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
237
+        $headers = "MIME-Version: 1.0"."\r\n";
238
+        $headers .= "Content-type: text/html; charset=UTF-8"."\r\n";
239 239
         if (!empty($toMail)) {
240
-            $headers .= "Cc: " . $this->model->getConfig()->getFeedbackAddress() . "\r\n";
240
+            $headers .= "Cc: ".$this->model->getConfig()->getFeedbackAddress()."\r\n";
241 241
         }
242 242
         if (!empty($fromEmail)) {
243 243
             $headers .= "Reply-To: $fromName <$fromEmail>\r\n";
244 244
         }
245 245
         $service = $this->model->getConfig()->getServiceName();
246
-        return $headers . "From: $fromName via $service <$sender>";
246
+        return $headers."From: $fromName via $service <$sender>";
247 247
     }
248 248
 
249 249
     /**
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
     public function sendFeedback($request, $message, $messageSubject, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null)
258 258
     {
259 259
         $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress();
260
-        $messageSubject = "[" . $this->model->getConfig()->getServiceName() . "] " . $messageSubject;
260
+        $messageSubject = "[".$this->model->getConfig()->getServiceName()."] ".$messageSubject;
261 261
         if ($fromVocab !== null && $fromVocab !== '') {
262
-            $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "<br />" . $message;
262
+            $message = 'Feedback from vocab: '.strtoupper($fromVocab)."<br />".$message;
263 263
         }
264 264
         $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender();
265 265
         // determine the sender address of the message
@@ -272,10 +272,10 @@  discard block
 block discarded – undo
272 272
         $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender);
273 273
         $params = empty($envelopeSender) ? '' : "-f $envelopeSender";
274 274
         // adding some information about the user for debugging purposes.
275
-        $message = $message . "<br /><br /> Debugging information:"
276
-            . "<br />Timestamp: " . date(DATE_RFC2822)
277
-            . "<br />User agent: " . $request->getServerConstant('HTTP_USER_AGENT')
278
-            . "<br />Referer: " . $request->getServerConstant('HTTP_REFERER');
275
+        $message = $message."<br /><br /> Debugging information:"
276
+            . "<br />Timestamp: ".date(DATE_RFC2822)
277
+            . "<br />User agent: ".$request->getServerConstant('HTTP_USER_AGENT')
278
+            . "<br />Referer: ".$request->getServerConstant('HTTP_REFERER');
279 279
 
280 280
         try {
281 281
             mail($toAddress, $messageSubject, $message, $headers, $params);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             header("HTTP/1.0 404 Not Found");
284 284
             $template = $this->twig->loadTemplate('error-page.twig');
285 285
             if ($this->model->getConfig()->getLogCaughtExceptions()) {
286
-                error_log('Caught exception: ' . $e->getMessage());
286
+                error_log('Caught exception: '.$e->getMessage());
287 287
             }
288 288
 
289 289
             echo $template->render(
@@ -328,13 +328,13 @@  discard block
 block discarded – undo
328 328
         $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : null;
329 329
         $vocabObjects = array();
330 330
         if ($vocids) {
331
-            foreach($vocids as $vocid) {
331
+            foreach ($vocids as $vocid) {
332 332
                 try {
333 333
                     $vocabObjects[] = $this->model->getVocabulary($vocid);
334 334
                 } catch (ValueError $e) {
335 335
                     // fail fast with an error page if the vocabulary cannot be found
336 336
                     if ($this->model->getConfig()->getLogCaughtExceptions()) {
337
-                        error_log('Caught exception: ' . $e->getMessage());
337
+                        error_log('Caught exception: '.$e->getMessage());
338 338
                     }
339 339
                     header("HTTP/1.0 400 Bad Request");
340 340
                     $this->invokeGenericErrorPage($request, $e->getMessage());
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $errored = true;
357 357
             header("HTTP/1.0 500 Internal Server Error");
358 358
             if ($this->model->getConfig()->getLogCaughtExceptions()) {
359
-                error_log('Caught exception: ' . $e->getMessage());
359
+                error_log('Caught exception: '.$e->getMessage());
360 360
             }
361 361
         }
362 362
         $vocabList = $this->model->getVocabularyList();
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                 'search_count' => $counts,
369 369
                 'languages' => $this->languages,
370 370
                 'search_results' => $searchResults,
371
-                'rest' => $parameters->getOffset()>0,
371
+                'rest' => $parameters->getOffset() > 0,
372 372
                 'global_search' => true,
373 373
                 'search_failed' => $errored,
374 374
                 'term' => $request->getQueryParamRaw('q'),
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         } catch (Exception $e) {
396 396
             header("HTTP/1.0 500 Internal Server Error");
397 397
             if ($this->model->getConfig()->getLogCaughtExceptions()) {
398
-                error_log('Caught exception: ' . $e->getMessage());
398
+                error_log('Caught exception: '.$e->getMessage());
399 399
             }
400 400
 
401 401
             echo $template->render(
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         } catch (Exception $e) {
420 420
             header("HTTP/1.0 404 Not Found");
421 421
             if ($this->model->getConfig()->getLogCaughtExceptions()) {
422
-                error_log('Caught exception: ' . $e->getMessage());
422
+                error_log('Caught exception: '.$e->getMessage());
423 423
             }
424 424
 
425 425
             echo $template->render(
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
                 'vocab' => $vocab,
438 438
                 'search_results' => $searchResults,
439 439
                 'search_count' => $counts,
440
-                'rest' => $parameters->getOffset()>0,
440
+                'rest' => $parameters->getOffset() > 0,
441 441
                 'limit_parent' => $parameters->getParentLimit(),
442 442
                 'limit_type' =>  $request->getQueryParam('type') ? explode('+', $request->getQueryParam('type')) : null,
443 443
                 'limit_group' => $parameters->getGroupLimit(),
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
      * Loads and renders the view containing a list of recent changes in the vocabulary.
570 570
      * @param Request $request
571 571
      */
572
-    public function invokeChangeList($request, $prop='dc:created')
572
+    public function invokeChangeList($request, $prop = 'dc:created')
573 573
     {
574 574
         $offset = ($request->getQueryParam('offset') && is_numeric($request->getQueryParam('offset')) && $request->getQueryParam('offset') >= 0) ? $request->getQueryParam('offset') : 0;
575 575
         $limit = ($request->getQueryParam('limit') && is_numeric($request->getQueryParam('limit')) && $request->getQueryParam('limit') >= 0) ? $request->getQueryParam('limit') : 200;
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
      * @param int $limit maximum number of concepts to return
598 598
      * @return Array list of concepts
599 599
      */
600
-    public function getChangeList($request, $prop, $offset=0, $limit=200)
600
+    public function getChangeList($request, $prop, $offset = 0, $limit = 200)
601 601
     {
602 602
         // set language parameters for gettext
603 603
         $this->setLanguageProperties($request->getLang());
@@ -614,9 +614,9 @@  discard block
 block discarded – undo
614 614
     public function formatChangeList($changeList, $lang)
615 615
     {
616 616
         $formatByDate = array();
617
-        foreach($changeList as $concept) {
617
+        foreach ($changeList as $concept) {
618 618
             $concept['datestring'] = Punic\Calendar::formatDate($concept['date'], 'medium', $lang);
619
-            $formatByDate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true) . Punic\Calendar::format($concept['date'], ' y', $lang) ][strtolower($concept['prefLabel'])] = $concept;
619
+            $formatByDate[Punic\Calendar::getMonthName($concept['date'], 'wide', $lang, true).Punic\Calendar::format($concept['date'], ' y', $lang)][strtolower($concept['prefLabel'])] = $concept;
620 620
         }
621 621
         return $formatByDate;
622 622
     }
Please login to merge, or discard this patch.
model/Model.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -220,18 +220,18 @@  discard block
 block discarded – undo
220 220
         }
221 221
 
222 222
         $vocabs = $params->getVocabs();
223
-        $showDeprecated=false;
223
+        $showDeprecated = false;
224 224
         if (sizeof($vocabs) === 1) { // search within vocabulary
225 225
             $voc = $vocabs[0];
226 226
             $sparql = $voc->getSparql();
227
-            $showDeprecated=$voc->getConfig()->getShowDeprecated();
227
+            $showDeprecated = $voc->getConfig()->getShowDeprecated();
228 228
         } else { // multi-vocabulary or global search
229 229
             $voc = null;
230 230
             $sparql = $this->getDefaultSparql();
231 231
             // @TODO : in a global search showDeprecated will always be false and cannot be set globally
232 232
         }
233 233
 
234
-        $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params,$showDeprecated);
234
+        $results = $sparql->queryConcepts($vocabs, $params->getAdditionalFields(), $params->getUnique(), $params, $showDeprecated);
235 235
         if ($params->getRest() && $results && $params->getSearchLimit() !== 0) {
236 236
           $results = array_slice($results, $params->getOffset(), $params->getSearchLimit());
237 237
         }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
     public function getVocabularyCategories()
387 387
     {
388 388
         $cats = $this->globalConfig->getGraph()->allOfType('skos:Concept');
389
-        if(empty($cats)) {
389
+        if (empty($cats)) {
390 390
             return array(new VocabularyCategory($this, null));
391 391
         }
392 392
 
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
         }
468 468
 
469 469
         // if there are multiple vocabularies and one is the preferred vocabulary, return it
470
-        if($preferredVocabId != null) {
470
+        if ($preferredVocabId != null) {
471 471
             foreach ($vocabs as $vocab) {
472
-                if($vocab->getId() == $preferredVocabId) {
472
+                if ($vocab->getId() == $preferredVocabId) {
473 473
                     try {
474 474
                         // double check that a label exists in the preferred vocabulary
475 475
                         if ($vocab->getConceptLabel($uri, null) !== null) {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                         }
481 481
                     } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
482 482
                         if ($this->getConfig()->getLogCaughtExceptions()) {
483
-                            error_log('Caught exception: ' . $e->getMessage());
483
+                            error_log('Caught exception: '.$e->getMessage());
484 484
                         }
485 485
                         break;
486 486
                     }
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
                 }
497 497
             } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
498 498
                 if ($this->getConfig()->getLogCaughtExceptions()) {
499
-                    error_log('Caught exception: ' . $e->getMessage());
499
+                    error_log('Caught exception: '.$e->getMessage());
500 500
                 }
501 501
                 break;
502 502
             }
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
         // using apc cache for the resource if available
567 567
         if ($this->globalConfig->getCache()->isAvailable()) {
568 568
             // @codeCoverageIgnoreStart
569
-            $key = 'fetch: ' . $uri;
569
+            $key = 'fetch: '.$uri;
570 570
             $resource = $this->globalConfig->getCache()->fetch($key);
571 571
             if ($resource === null || $resource === false) { // was not found in cache, or previous request failed
572 572
                 $resource = $this->resolver->resolve($uri, $this->getConfig()->getHttpTimeout());
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
      */
588 588
     public function getSparqlImplementation($dialect, $endpoint, $graph)
589 589
     {
590
-        $classname = $dialect . "Sparql";
590
+        $classname = $dialect."Sparql";
591 591
 
592 592
         return new $classname($endpoint, $graph, $this);
593 593
     }
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                 return isset($results[$lang]) ? $results[$lang] : null;
53 53
             } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
54 54
                 if ($this->model->getConfig()->getLogCaughtExceptions()) {
55
-                    error_log('Caught exception: ' . $e->getMessage());
55
+                    error_log('Caught exception: '.$e->getMessage());
56 56
                 }
57 57
             }
58 58
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 return isset($results) ? $results : null;
75 75
             } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
76 76
                 if ($this->model->getConfig()->getLogCaughtExceptions()) {
77
-                    error_log('Caught exception: ' . $e->getMessage());
77
+                    error_log('Caught exception: '.$e->getMessage());
78 78
                 }
79 79
             }
80 80
         }
Please login to merge, or discard this patch.
model/Vocabulary.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             return $lname;
103 103
         }
104 104
         // already a full URI
105
-        return $this->getUriSpace() . $lname;
105
+        return $this->getUriSpace().$lname;
106 106
     }
107 107
 
108 108
     /**
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             $result = $sparql->queryConceptScheme($defaultcs);
165 165
         } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
166 166
              if ($this->model->getConfig()->getLogCaughtExceptions()) {
167
-                 error_log('Caught exception: ' . $e->getMessage());
167
+                 error_log('Caught exception: '.$e->getMessage());
168 168
              }
169 169
              return null;
170 170
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 foreach ($conceptscheme->allLiterals($prop, null) as $val) {
198 198
                     $prop = (substr($prop, 0, 5) == 'dc11:') ? str_replace('dc11:', 'dc:', $prop) : $prop;
199 199
                     if ($val->getValue() instanceof DateTime) {
200
-                        $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang) . ' ' . Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang);
200
+                        $val = Punic\Calendar::formatDate($val->getValue(), 'full', $lang).' '.Punic\Calendar::format($val->getValue(), 'HH:mm:ss', $lang);
201 201
                     }
202 202
                     $ret[$prop][] = $val;
203 203
                 }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             $conceptSchemes = $this->getSparql()->queryConceptSchemes($lang);
255 255
         } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
256 256
              if ($this->model->getConfig()->getLogCaughtExceptions()) {
257
-                 error_log('Caught exception: ' . $e->getMessage());
257
+                 error_log('Caught exception: '.$e->getMessage());
258 258
              }
259 259
         }
260 260
         return $conceptSchemes;
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
         }
326 326
         // don't know how to parse
327 327
         $rev = $parts[2];
328
-        $datestr = $parts[3] . ' ' . $parts[4];
328
+        $datestr = $parts[3].' '.$parts[4];
329 329
 
330 330
         return "$datestr (r$rev)";
331 331
     }
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
      * @param string $array the uri of the concept array class, eg. isothes:ThesaurusArray
337 337
      * @param string $group the uri of the  concept group class, eg. isothes:ConceptGroup
338 338
      */
339
-    public function getStatistics($lang = '', $array=null, $group=null)
339
+    public function getStatistics($lang = '', $array = null, $group = null)
340 340
     {
341 341
         $sparql = $this->getSparql();
342 342
         // find the number of concepts
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
             $conceptInfo = $sparql->queryConceptInfo($uri, $this->config->getArrayClassURI(), array($this), $clang);
455 455
         } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
456 456
              if ($this->model->getConfig()->getLogCaughtExceptions()) {
457
-                 error_log('Caught exception: ' . $e->getMessage());
457
+                 error_log('Caught exception: '.$e->getMessage());
458 458
              }
459 459
         }
460 460
         return $conceptInfo;
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
         return $this->getSparql()->queryChangeList($prop, $clang, $offset, $limit, $showDeprecated);
666 666
     }
667 667
 
668
-    public function getTitle($lang=null) {
668
+    public function getTitle($lang = null) {
669 669
       return $this->config->getTitle($lang);
670 670
     }
671 671
 
Please login to merge, or discard this patch.
model/VocabularyConfig.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     "skos:related", "skos:historyNote", "skosmos:memberOf",
30 30
     "skosmos:memberOfArray");
31 31
 
32
-    public function __construct($resource, $globalPlugins=array())
32
+    public function __construct($resource, $globalPlugins = array())
33 33
     {
34 34
         $this->resource = $resource;
35 35
         $this->globalPlugins = $globalPlugins;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                 $paramValue = $paramLiteral->getValue();
119 119
                 $paramLang = $paramLiteral->getLang();
120 120
                 if ($paramLang) {
121
-                    $paramName .= '_' . $paramLang;
121
+                    $paramName .= '_'.$paramLang;
122 122
                 }
123 123
                 $this->pluginParameters[$pluginName][$paramName] = $paramValue;
124 124
             }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $labelProperty = $override->getResource('skosmos:property');
151 151
         $labelPropUri = $labelProperty->shorten();
152 152
         if (empty($this->labelOverrides[$labelPropUri])) {
153
-            $this->labelOverrides[$labelPropUri]  = array();
153
+            $this->labelOverrides[$labelPropUri] = array();
154 154
         }
155 155
         $newOverrides = array();
156 156
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $langs = $this->getLanguages();
225 225
         $deflang = reset($langs); // picking the first one from the list with reset since the keys are not numeric
226 226
         if (sizeof($langs) > 1) {
227
-            trigger_error("Default language for vocabulary '" . $this->getShortName() . "' unknown, choosing '$deflang'.", E_USER_WARNING);
227
+            trigger_error("Default language for vocabulary '".$this->getShortName()."' unknown, choosing '$deflang'.", E_USER_WARNING);
228 228
         }
229 229
 
230 230
         return $deflang;
Please login to merge, or discard this patch.
model/PluginRegister.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 class PluginRegister {
4 4
     private $requestedPlugins;
5 5
 
6
-    public function __construct($requestedPlugins=array()) {
6
+    public function __construct($requestedPlugins = array()) {
7 7
         $this->requestedPlugins = $requestedPlugins;
8 8
         $this->pluginOrder = array();
9 9
         foreach ($this->requestedPlugins as $index => $value) {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param boolean $raw interpret $type values as raw text instead of files
46 46
      * @return array
47 47
      */
48
-    private function filterPlugins($type, $raw=false) {
48
+    private function filterPlugins($type, $raw = false) {
49 49
         $plugins = $this->getPlugins();
50 50
         $plugins = $this->sortPlugins($plugins);
51 51
         $ret = array();
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                     }
59 59
                     else {
60 60
                         foreach ($files[$type] as $file) {
61
-                            array_push($ret[$name], 'plugins/' . $name . '/' . $file);
61
+                            array_push($ret[$name], 'plugins/'.$name.'/'.$file);
62 62
                         }
63 63
                     }
64 64
                 }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @param array $names the plugin name strings (foldernames) in an array
90 90
      * @return array
91 91
      */
92
-    public function getPluginsJS($names=null) {
92
+    public function getPluginsJS($names = null) {
93 93
         if ($names) {
94 94
             $names = array_merge($this->requestedPlugins, $names);
95 95
             return $this->filterPluginsByName('js', $names);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @param array $names the plugin name strings (foldernames) in an array
103 103
      * @return array
104 104
      */
105
-    public function getPluginsCSS($names=null) {
105
+    public function getPluginsCSS($names = null) {
106 106
         if ($names) {
107 107
             $names = array_merge($this->requestedPlugins, $names);
108 108
             return $this->filterPluginsByName('css', $names);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * @param array $names the plugin name strings (foldernames) in an array
116 116
      * @return array
117 117
      */
118
-    public function getPluginsTemplates($names=null) {
118
+    public function getPluginsTemplates($names = null) {
119 119
         if ($names) {
120 120
             $names = array_merge($this->requestedPlugins, $names);
121 121
             return $this->filterPluginsByName('templates', $names);
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
      * @param array $names the plugin name strings (foldernames) in an array
129 129
      * @return array
130 130
      */
131
-    public function getTemplates($names=null) {
131
+    public function getTemplates($names = null) {
132 132
         $templateStrings = array();
133 133
         $plugins = $this->getPluginsTemplates($names);
134 134
         foreach ($plugins as $folder => $templates) {
135 135
             foreach ($templates as $path) {
136 136
                 if (file_exists($path)) {
137 137
                     $filename = explode('/', $path);
138
-                    $filename = $filename[sizeof($filename)-1];
139
-                    $id = $folder . '-' . substr($filename, 0 , (strrpos($filename, ".")));
138
+                    $filename = $filename[sizeof($filename) - 1];
139
+                    $id = $folder.'-'.substr($filename, 0, (strrpos($filename, ".")));
140 140
                     $templateStrings[$id] = file_get_contents($path);
141 141
                 }
142 142
             }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param array $names the plugin name strings (foldernames) in an array
150 150
      * @return array
151 151
      */
152
-    public function getPluginCallbacks($names=null) {
152
+    public function getPluginCallbacks($names = null) {
153 153
         if ($names) {
154 154
             $names = array_merge($this->requestedPlugins, $names);
155 155
             return $this->filterPluginsByName('callback', $names);
Please login to merge, or discard this patch.