mirror of
https://github.com/ivuorinen/business-data-fetcher.git
synced 2026-03-18 01:00:53 +00:00
updated docs, example, extensive use of Traits with better handling. valid level 9 phpstan codebase.
31 lines
797 B
PHP
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,
|
|
};
|
|
}
|
|
}
|