Passed
Push — vocab-search-language-menu ( 75d806...e4b339 )
by
unknown
05:19
created
src/model/Model.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * Initializes the Model object
31 31
      */
32
-    public function __construct(string $config_filename="../../config.ttl")
32
+    public function __construct(string $config_filename = "../../config.ttl")
33 33
     {
34 34
         $this->resolver = new Resolver($this);
35 35
         $this->globalConfig = new GlobalConfig($this, $config_filename);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
                 $this->translator = new Translator($langcode);
41 41
             }
42 42
             $this->translator->addLoader('json', new JsonFileLoader());
43
-            $this->translator->addResource('json', __DIR__.'/../../resource/translations/messages.' . $langcode . '.json', $langcode);
43
+            $this->translator->addResource('json', __DIR__.'/../../resource/translations/messages.'.$langcode.'.json', $langcode);
44 44
         }
45 45
         $this->initializeLogging();
46 46
     }
@@ -274,11 +274,11 @@  discard block
 block discarded – undo
274 274
         }
275 275
 
276 276
         $vocabs = $params->getVocabs();
277
-        $showDeprecated=false;
277
+        $showDeprecated = false;
278 278
         if (sizeof($vocabs) === 1) { // search within vocabulary
279 279
             $voc = $vocabs[0];
280 280
             $sparql = $voc->getSparql();
281
-            $showDeprecated=$voc->getConfig()->getShowDeprecated();
281
+            $showDeprecated = $voc->getConfig()->getShowDeprecated();
282 282
         } else { // multi-vocabulary or global search
283 283
             $voc = null;
284 284
             $sparql = $this->getDefaultSparql();
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
     public function getVocabularyCategories()
440 440
     {
441 441
         $cats = $this->globalConfig->getGraph()->allOfType('skos:Concept');
442
-        if(empty($cats)) {
442
+        if (empty($cats)) {
443 443
             return array(new VocabularyCategory($this, null));
444 444
         }
445 445
 
@@ -520,9 +520,9 @@  discard block
 block discarded – undo
520 520
         }
521 521
 
522 522
         // if there are multiple vocabularies and one is the preferred vocabulary, return it
523
-        if($preferredVocabId != null) {
523
+        if ($preferredVocabId != null) {
524 524
             foreach ($vocabs as $vocab) {
525
-                if($vocab->getId() == $preferredVocabId) {
525
+                if ($vocab->getId() == $preferredVocabId) {
526 526
                     try {
527 527
                         // double check that a label exists in the preferred vocabulary
528 528
                         if ($vocab->getConceptLabel($uri, null) !== null) {
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
                         }
534 534
                     } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
535 535
                         if ($this->getConfig()->getLogCaughtExceptions()) {
536
-                            error_log('Caught exception: ' . $e->getMessage());
536
+                            error_log('Caught exception: '.$e->getMessage());
537 537
                         }
538 538
                         break;
539 539
                     }
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
                 }
550 550
             } catch (EasyRdf\Http\Exception | EasyRdf\Exception | Throwable $e) {
551 551
                 if ($this->getConfig()->getLogCaughtExceptions()) {
552
-                    error_log('Caught exception: ' . $e->getMessage());
552
+                    error_log('Caught exception: '.$e->getMessage());
553 553
                 }
554 554
                 break;
555 555
             }
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
         // using apc cache for the resource if available
623 623
         if ($this->globalConfig->getCache()->isAvailable()) {
624 624
             // @codeCoverageIgnoreStart
625
-            $key = 'fetch: ' . $uri;
625
+            $key = 'fetch: '.$uri;
626 626
             $resource = $this->globalConfig->getCache()->fetch($key);
627 627
             if ($resource === null || $resource === false) { // was not found in cache, or previous request failed
628 628
                 $resource = $this->resolver->resolve($uri, $this->getConfig()->getHttpTimeout());
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
      */
644 644
     public function getSparqlImplementation($dialect, $endpoint, $graph)
645 645
     {
646
-        $classname = $dialect . "Sparql";
646
+        $classname = $dialect."Sparql";
647 647
 
648 648
         return new $classname($endpoint, $graph, $this);
649 649
     }
Please login to merge, or discard this patch.