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:
2024-08-18 18:23:05 +03:00
parent 8771b14d2a
commit aa6786981a
24 changed files with 406 additions and 296 deletions

View 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,
};
}
}