Skip to content
Snippets Groups Projects
Commit 5fd0980f authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(fediverse): use config name to get Fediverse config properties instead of...

fix(fediverse): use config name to get Fediverse config properties instead of hardcoded class string
parent 4af40b5a
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,6 @@ declare(strict_types=1);
namespace Modules\Fediverse\Entities;
use CodeIgniter\Entity\Entity;
use Modules\Fediverse\Config\Fediverse;
use RuntimeException;
/**
......@@ -112,7 +111,7 @@ class Actor extends Entity
public function getAvatarImageUrl(): string
{
if ($this->attributes['avatar_image_url'] === null) {
return base_url(config(Fediverse::class)->defaultAvatarImagePath);
return base_url(config('Fediverse')->defaultAvatarImagePath);
}
return $this->attributes['avatar_image_url'];
......@@ -121,7 +120,7 @@ class Actor extends Entity
public function getAvatarImageMimetype(): string
{
if ($this->attributes['avatar_image_mimetype'] === null) {
return config(Fediverse::class)->defaultAvatarImageMimetype;
return config('Fediverse')->defaultAvatarImageMimetype;
}
return $this->attributes['avatar_image_mimetype'];
......@@ -130,7 +129,7 @@ class Actor extends Entity
public function getCoverImageUrl(): string
{
if ($this->attributes['cover_image_url'] === null) {
return base_url(config(Fediverse::class)->defaultCoverImagePath);
return base_url(config('Fediverse')->defaultCoverImagePath);
}
return $this->attributes['cover_image_url'];
......@@ -139,7 +138,7 @@ class Actor extends Entity
public function getCoverImageMimetype(): string
{
if ($this->attributes['cover_image_mimetype'] === null) {
return config(Fediverse::class)->defaultCoverImageMimetype;
return config('Fediverse')->defaultCoverImageMimetype;
}
return $this->attributes['cover_image_mimetype'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment