mirror of
https://github.com/ivuorinen/business-data-fetcher.git
synced 2026-03-18 07:00:54 +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:
30
src/Traits/HasRegister.php
Normal file
30
src/Traits/HasRegister.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user