Continue improving type hints

This commit is contained in:
Alex Cabal 2024-05-10 22:28:24 -05:00
parent eb376c87bd
commit 703e1a7a03
73 changed files with 98 additions and 114 deletions

View file

@ -8,20 +8,18 @@ use Safe\DateTimeImmutable;
* @property ?array<string> $AlternateNames
*/
class Artist{
/**
* @var array<string> $_AlternateNames
*/
use Traits\Accessor;
public ?int $ArtistId = null;
public ?string $Name = null;
public ?DateTimeImmutable $Created = null;
public ?DateTimeImmutable $Updated = null;
protected ?int $_DeathYear = null;
protected ?string $_UrlName = null;
protected ?string $_Url = null;
protected $_AlternateNames = null; // Don't type hint this here, otherwise PHPStan will complain
/** @var ?array<string> $_AlternateNames */
protected $_AlternateNames = null;
// *******
// SETTERS