Add type hints to Artist class members

This commit is contained in:
Alex Cabal 2024-01-08 14:07:30 -06:00
parent 8e37543fa3
commit d7718218ad
3 changed files with 8 additions and 15 deletions

View file

@ -5,23 +5,21 @@ use function Safe\date;
/**
* @property string $UrlName
* @property array<string> $AlternateSpellings
* @property array<string> $_AlternateSpellings
*/
class Artist extends PropertiesBase{
public $ArtistId;
public $Name;
public $DeathYear;
public $Created;
public $Updated;
protected $_UrlName;
protected $_AlternateSpellings;
public ?int $ArtistId;
public ?string $Name;
public ?int $DeathYear;
public ?datetime $Created;
public ?datetime $Updated;
protected ?string $_UrlName;
protected $_AlternateSpellings;
// *******
// GETTERS
// *******
/**
* @return string
*/
protected function GetUrlName(): string{
if($this->Name === null || $this->Name == ''){
return '';

View file

@ -3,11 +3,9 @@ use Safe\DateTime;
use function Safe\copy;
use function Safe\date;
use function Safe\exec;
use function Safe\filesize;
use function Safe\getimagesize;
use function Safe\ini_get;
use function Safe\preg_replace;
use function Safe\sprintf;
/**
* @property string $UrlName

View file

@ -5,9 +5,6 @@ class ArtworkTag extends Tag{
// GETTERS
// *******
/**
* @return string
*/
protected function GetUrl(): string{
if($this->_Url === null){
$this->_Url = '/artworks?query=' . Formatter::MakeUrlSafe($this->Name);