mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 10:02:02 -04:00
Add type hints to Artist class members
This commit is contained in:
parent
8e37543fa3
commit
d7718218ad
3 changed files with 8 additions and 15 deletions
|
@ -5,23 +5,21 @@ use function Safe\date;
|
||||||
/**
|
/**
|
||||||
* @property string $UrlName
|
* @property string $UrlName
|
||||||
* @property array<string> $AlternateSpellings
|
* @property array<string> $AlternateSpellings
|
||||||
|
* @property array<string> $_AlternateSpellings
|
||||||
*/
|
*/
|
||||||
class Artist extends PropertiesBase{
|
class Artist extends PropertiesBase{
|
||||||
public $ArtistId;
|
public ?int $ArtistId;
|
||||||
public $Name;
|
public ?string $Name;
|
||||||
public $DeathYear;
|
public ?int $DeathYear;
|
||||||
public $Created;
|
public ?datetime $Created;
|
||||||
public $Updated;
|
public ?datetime $Updated;
|
||||||
protected $_UrlName;
|
protected ?string $_UrlName;
|
||||||
protected $_AlternateSpellings;
|
protected $_AlternateSpellings;
|
||||||
|
|
||||||
// *******
|
// *******
|
||||||
// GETTERS
|
// GETTERS
|
||||||
// *******
|
// *******
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function GetUrlName(): string{
|
protected function GetUrlName(): string{
|
||||||
if($this->Name === null || $this->Name == ''){
|
if($this->Name === null || $this->Name == ''){
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -3,11 +3,9 @@ use Safe\DateTime;
|
||||||
use function Safe\copy;
|
use function Safe\copy;
|
||||||
use function Safe\date;
|
use function Safe\date;
|
||||||
use function Safe\exec;
|
use function Safe\exec;
|
||||||
use function Safe\filesize;
|
|
||||||
use function Safe\getimagesize;
|
use function Safe\getimagesize;
|
||||||
use function Safe\ini_get;
|
use function Safe\ini_get;
|
||||||
use function Safe\preg_replace;
|
use function Safe\preg_replace;
|
||||||
use function Safe\sprintf;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property string $UrlName
|
* @property string $UrlName
|
||||||
|
|
|
@ -5,9 +5,6 @@ class ArtworkTag extends Tag{
|
||||||
// GETTERS
|
// GETTERS
|
||||||
// *******
|
// *******
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function GetUrl(): string{
|
protected function GetUrl(): string{
|
||||||
if($this->_Url === null){
|
if($this->_Url === null){
|
||||||
$this->_Url = '/artworks?query=' . Formatter::MakeUrlSafe($this->Name);
|
$this->_Url = '/artworks?query=' . Formatter::MakeUrlSafe($this->Name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue