mirror of
https://github.com/ivuorinen/business-data-fetcher.git
synced 2026-03-18 10:01:06 +00:00
feat: parser now writes, added missing fields
updated docs, example, extensive use of Traits with better handling. valid level 9 phpstan codebase.
This commit is contained in:
25
src/Traits/HasAuthority.php
Normal file
25
src/Traits/HasAuthority.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user