@@ -6,10 +6,10 @@ discard block |
||
6 | 6 | class GlobalConfig { |
7 | 7 | private $languages; |
8 | 8 | |
9 | - public function __construct($config_name='/../config.inc') |
|
9 | + public function __construct($config_name = '/../config.inc') |
|
10 | 10 | { |
11 | 11 | try { |
12 | - $file_path = dirname(__FILE__) . $config_name; |
|
12 | + $file_path = dirname(__FILE__).$config_name; |
|
13 | 13 | if (!file_exists($file_path)) { |
14 | 14 | throw new Exception('config.inc file is missing, please provide one.'); |
15 | 15 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->languages = $LANGUAGES; |
19 | 19 | } |
20 | 20 | } catch (Exception $e) { |
21 | - echo "Error: " . $e->getMessage(); |
|
21 | + echo "Error: ".$e->getMessage(); |
|
22 | 22 | return; |
23 | 23 | } |
24 | 24 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * Wraps apc_store() and apcu_store() |
24 | 24 | */ |
25 | - public function store($key, $value, $ttl=3600) { |
|
25 | + public function store($key, $value, $ttl = 3600) { |
|
26 | 26 | if (function_exists('apc_store')) { |
27 | 27 | return apc_store($key, $value); |
28 | 28 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | { |
8 | 8 | private $plugins; |
9 | 9 | |
10 | - public function __construct($resource, $globalPlugins=array()) |
|
10 | + public function __construct($resource, $globalPlugins = array()) |
|
11 | 11 | { |
12 | 12 | $this->resource = $resource; |
13 | 13 | $plugins = $this->resource->allLiterals('skosmos:usePlugin'); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @param string $property the property to query |
41 | 41 | * @param string $lang preferred language for the literal, |
42 | 42 | */ |
43 | - private function getLiteral($property, $lang=null) |
|
43 | + private function getLiteral($property, $lang = null) |
|
44 | 44 | { |
45 | 45 | if (!isset($lang)) {; |
46 | 46 | $lang = $this->getEnvLang(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $langs = $this->getLanguages(); |
73 | 73 | $deflang = reset($langs); // picking the first one from the list with reset since the keys are not numeric |
74 | 74 | if (sizeof($langs) > 1) { |
75 | - trigger_error("Default language for vocabulary '" . $this->getShortName() . "' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
75 | + trigger_error("Default language for vocabulary '".$this->getShortName()."' unknown, choosing '$deflang'.", E_USER_WARNING); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $deflang; |
@@ -75,7 +75,7 @@ |
||
75 | 75 | if ($this->rest) { |
76 | 76 | return $term; |
77 | 77 | } |
78 | - return strpos($term, "*") === false ? $term . "*" : $term; // default to prefix search |
|
78 | + return strpos($term, "*") === false ? $term."*" : $term; // default to prefix search |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function getContentLang() |