Fix scrutinizer hints

This commit is contained in:
Stéphane Goetz
2019-12-07 11:22:40 +01:00
parent b5633e93c7
commit 8215808282
12 changed files with 55 additions and 46 deletions

View File

@ -16,17 +16,18 @@ class Config extends BaseConfig
public function getEditOn()
{
if (array_key_exists('edit_on', $this)) {
if (is_string($this['edit_on'])) {
return $this->prepareGithubUrl($this['edit_on']);
if ($this->hasValue('edit_on')) {
$edit_on = $this->getValue('edit_on');
if (is_string($edit_on)) {
return $this->prepareGithubUrl($edit_on);
} else {
$this['edit_on']['basepath'] = rtrim($this['edit_on']['basepath'], '/');
$edit_on['basepath'] = rtrim($edit_on['basepath'], '/');
return $this['edit_on'];
return $edit_on;
}
}
if (array_key_exists('edit_on_github', $this)) {
if ($this->hasValue('edit_on_github')) {
return $this->prepareGithubUrl($this->getValue('edit_on_github'));
}