@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | // convert to vocids array to support multi-vocabulary search |
169 | 169 | $vocids = ($vocabs !== null && $vocabs !== '') ? explode(' ', $vocabs) : array(); |
170 | 170 | $vocabObjects = array(); |
171 | - foreach($vocids as $vocid) { |
|
171 | + foreach ($vocids as $vocid) { |
|
172 | 172 | $vocabObjects[] = $this->model->getVocabulary($vocid); |
173 | 173 | } |
174 | 174 | $parameters->setVocabularies($vocabObjects); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | if ($request->getQueryParam('labellang')) { |
202 | 202 | $ret['@context']['@language'] = $request->getQueryParam('labellang'); |
203 | 203 | } elseif ($request->getQueryParam('lang')) { |
204 | - $ret['@context']['@language'] = $request->getQueryParam('lang');; |
|
204 | + $ret['@context']['@language'] = $request->getQueryParam('lang'); ; |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | return $this->returnJson($ret); |
@@ -10,6 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | class VocabularyCategory extends DataObject |
12 | 12 | { |
13 | + /** |
|
14 | + * @param Model $model |
|
15 | + */ |
|
13 | 16 | public function __construct($model, $resource) |
14 | 17 | { |
15 | 18 | if (!($model instanceof Model)) { |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Copyright (c) 2016 University of Helsinki |
|
4 | - * MIT License |
|
5 | - * see LICENSE.txt for more information |
|
6 | - */ |
|
3 | + * Copyright (c) 2016 University of Helsinki |
|
4 | + * MIT License |
|
5 | + * see LICENSE.txt for more information |
|
6 | + */ |
|
7 | 7 | |
8 | 8 | class NamespaceExposingTurtleParser extends EasyRdf_Parser_Turtle |
9 | 9 | { |
@@ -6,7 +6,7 @@ |
||
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 | 12 | $file_path = dirname(__FILE__) . $config_name; |
@@ -23,6 +23,9 @@ |
||
23 | 23 | } |
24 | 24 | } |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $name |
|
28 | + */ |
|
26 | 29 | private function getConstant($name, $default) |
27 | 30 | { |
28 | 31 | if (defined($name) && constant($name)) { |
@@ -68,10 +68,12 @@ |
||
68 | 68 | if ($sortable !== null) { |
69 | 69 | uksort($sortable, array($this, 'mycompare')); |
70 | 70 | foreach ($sortable as $prop => $vals) { |
71 | - if (is_array($prop)) // the ConceptProperty objects have their own sorting methods |
|
71 | + if (is_array($prop)) { |
|
72 | + // the ConceptProperty objects have their own sorting methods |
|
72 | 73 | { |
73 | 74 | ksort($sortable[$prop]); |
74 | 75 | } |
76 | + } |
|
75 | 77 | |
76 | 78 | } |
77 | 79 | } |
@@ -1,9 +1,9 @@ discard block |
||
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. |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function getEnvLang() |
116 | 116 | { |
117 | - // get language from locale, same as used by gettext, set by Controller |
|
118 | - return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
117 | + // get language from locale, same as used by gettext, set by Controller |
|
118 | + return substr(getenv("LC_ALL"), 0, 2); // @codeCoverageIgnore |
|
119 | 119 | } |
120 | 120 | } |
@@ -459,11 +459,11 @@ |
||
459 | 459 | trigger_error($e->getMessage(), E_USER_WARNING); |
460 | 460 | $ret = ''; |
461 | 461 | if ($this->resource->get('dc:modified')) { |
462 | - $modified = (string) $this->resource->get('dc:modified'); |
|
462 | + $modified = (string)$this->resource->get('dc:modified'); |
|
463 | 463 | $ret = gettext('skosmos:modified') . ' ' . $modified; |
464 | 464 | } |
465 | 465 | if ($this->resource->get('dc:created')) { |
466 | - $created .= (string) $this->resource->get('dc:created'); |
|
466 | + $created .= (string)$this->resource->get('dc:created'); |
|
467 | 467 | $ret .= ' ' . gettext('skosmos:created') . ' ' . $created; |
468 | 468 | } |
469 | 469 | } |
@@ -3,7 +3,7 @@ discard block |
||
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 | } |
9 | 9 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param array $names the plugin name strings (foldernames) in an array |
69 | 69 | * @return array |
70 | 70 | */ |
71 | - public function getPluginsJS($names=null) { |
|
71 | + public function getPluginsJS($names = null) { |
|
72 | 72 | if ($names) { |
73 | 73 | $names = array_merge($this->requestedPlugins, $names); |
74 | 74 | return $this->filterPluginsByName('js', $names); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * @param array $names the plugin name strings (foldernames) in an array |
82 | 82 | * @return array |
83 | 83 | */ |
84 | - public function getPluginsCSS($names=null) { |
|
84 | + public function getPluginsCSS($names = null) { |
|
85 | 85 | if ($names) { |
86 | 86 | $names = array_merge($this->requestedPlugins, $names); |
87 | 87 | return $this->filterPluginsByName('css', $names); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @param array $names the plugin name strings (foldernames) in an array |
95 | 95 | * @return array |
96 | 96 | */ |
97 | - public function getPluginsTemplates($names=null) { |
|
97 | + public function getPluginsTemplates($names = null) { |
|
98 | 98 | if ($names) { |
99 | 99 | $names = array_merge($this->requestedPlugins, $names); |
100 | 100 | return $this->filterPluginsByName('templates', $names); |
@@ -107,15 +107,15 @@ discard block |
||
107 | 107 | * @param array $names the plugin name strings (foldernames) in an array |
108 | 108 | * @return array |
109 | 109 | */ |
110 | - public function getTemplates($names=null) { |
|
110 | + public function getTemplates($names = null) { |
|
111 | 111 | $templateStrings = array(); |
112 | 112 | $plugins = $this->getPluginsTemplates($names); |
113 | 113 | foreach ($plugins as $folder => $templates) { |
114 | 114 | foreach ($templates as $path) { |
115 | 115 | if (file_exists($path)) { |
116 | 116 | $filename = explode('/', $path); |
117 | - $filename = $filename[sizeof($filename)-1]; |
|
118 | - $id = $folder . '-' . substr($filename, 0 , (strrpos($filename, "."))); |
|
117 | + $filename = $filename[sizeof($filename) - 1]; |
|
118 | + $id = $folder . '-' . substr($filename, 0, (strrpos($filename, "."))); |
|
119 | 119 | $templateStrings[$id] = file_get_contents($path); |
120 | 120 | } |
121 | 121 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param string $prop property type eg. 'rdf:type'. |
22 | 22 | * @param string $label |
23 | 23 | */ |
24 | - public function __construct($prop, $label, $super=null) |
|
24 | + public function __construct($prop, $label, $super = null) |
|
25 | 25 | { |
26 | 26 | $this->prop = $prop; |
27 | 27 | $this->label = $label; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | if (!empty($this->values)) { |
88 | 88 | uksort($this->values, function($a, $b) { |
89 | - return strnatcasecmp($a,$b); |
|
89 | + return strnatcasecmp($a, $b); |
|
90 | 90 | }); |
91 | 91 | } |
92 | 92 | $this->is_sorted = true; |