Use shorthand assignment for basic getters

This commit is contained in:
Alex Cabal 2025-02-27 16:03:26 -06:00
parent 99b5fd66f2
commit 7f5ffb4aea
21 changed files with 142 additions and 326 deletions

View file

@ -13,11 +13,7 @@ class ArtworkTag extends Tag{
// *******
protected function GetUrl(): string{
if(!isset($this->_Url)){
$this->_Url = '/artworks?query=' . Formatter::MakeUrlSafe($this->Name);
}
return $this->_Url;
return $this->_Url ??= '/artworks?query=' . Formatter::MakeUrlSafe($this->Name);
}