Files
business-data-fetcher/src/Traits/HasAuthority.php
Ismo Vuorinen aa6786981a feat: parser now writes, added missing fields
updated docs, example, extensive use of Traits with better handling.
valid level 9 phpstan codebase.
2024-08-18 18:23:05 +03:00

26 lines
581 B
PHP

<?php
namespace Ivuorinen\BusinessDataFetcher\Traits;
trait HasAuthority
{
/**
* @see getChangeString()
* @var int $authority What authority the change is related to.
*/
public int $authority;
/**
* Get the name of the authority.
*/
public function getAuthorityString(): string
{
return match ($this->authority) {
1 => 'Tax Administration',
2 => 'Finnish Patent and Registration Office',
3 => 'Population Register',
default => 'unknown:' . $this->authority,
};
}
}