Passed
Pull Request — master (#1252)
by
unknown
04:47
created
model/GlobalConfig.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     private $configModifiedTime = null;
32 32
 
33
-    public function __construct($config_name='/../config.ttl')
33
+    public function __construct($config_name = '/../config.ttl')
34 34
     {
35 35
         // if present, use value from env instead
36 36
         $config_name_env = getenv('SKOSMOS_CONFIG');
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
             if (str_starts_with($config_name, 'http://') || str_starts_with($config_name, 'https://')) {
44 44
                 $this->filePath = $config_name;
45 45
             } else {
46
-                $this->filePath = realpath( dirname(__FILE__) . $config_name );
46
+                $this->filePath = realpath(dirname(__FILE__).$config_name);
47 47
                 if (!file_exists($this->filePath)) {
48
-                    throw new Exception($config_name . ' is missing, please provide a config.ttl.');
48
+                    throw new Exception($config_name.' is missing, please provide a config.ttl.');
49 49
                 }
50 50
             }
51 51
             $this->initializeConfig();
52 52
         } catch (Exception $e) {
53
-            echo "Error: " . $e->getMessage();
53
+            echo "Error: ".$e->getMessage();
54 54
             return;
55 55
         }
56 56
     }
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
             // use APC user cache to store parsed config.ttl configuration
88 88
             if ($this->cache->isAvailable() && !is_null($this->configModifiedTime)) {
89 89
                 // @codeCoverageIgnoreStart
90
-                $key = realpath($this->filePath) . ", " . $this->configModifiedTime;
91
-                $nskey = "namespaces of " . $key;
90
+                $key = realpath($this->filePath).", ".$this->configModifiedTime;
91
+                $nskey = "namespaces of ".$key;
92 92
                 $this->graph = $this->cache->fetch($key);
93 93
                 $this->namespaces = $this->cache->fetch($nskey);
94 94
                 if ($this->graph === false || $this->namespaces === false) { // was not found in cache
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $this->resource = $configResources[0];
110 110
             $this->initializeNamespaces();
111 111
         } catch (Exception $e) {
112
-            echo "Error: " . $e->getMessage();
112
+            echo "Error: ".$e->getMessage();
113 113
         }      
114 114
     }
115 115
 
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
     public function getGlobalPlugins()
351 351
     {
352 352
         $globalPlugins = array();
353
-        $globalPluginsResource =  $this->getResource()->getResource("skosmos:globalPlugins");
353
+        $globalPluginsResource = $this->getResource()->getResource("skosmos:globalPlugins");
354 354
         if ($globalPluginsResource) {
355 355
             foreach ($globalPluginsResource as $resource) {
356 356
                 $globalPlugins[] = $resource->getValue();
Please login to merge, or discard this patch.