Files
business-data-fetcher/src/Traits/HasRegister.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

31 lines
797 B
PHP

<?php
namespace Ivuorinen\BusinessDataFetcher\Traits;
trait HasRegister
{
/**
* @see getRegisterString()
* @var int|null $register What register the change is related to.
*/
public int|null $register;
/**
* Get the name of the register.
*/
public function getRegisterString(): string
{
return match ($this->register) {
1 => 'Trade Register',
2 => 'Register of Foundations',
3 => 'Register of Associations',
4 => 'Tax Administration',
5 => 'Prepayment Register',
6 => 'VAT Register',
7 => 'Employer Register',
8 => 'Register of bodies liable for tax on insurance premiums',
default => 'unknown:' . $this->register,
};
}
}