| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function convertToDatabaseValue( mixed $value, AbstractPlatform $platform ): string { |
||
| 28 | if ( !( $value instanceof DomainAddressType ) ) { |
||
| 29 | throw new \LogicException( "Value from database has to be of type " . DomainAddressType::class ); |
||
| 30 | } |
||
| 31 | return match ( $value ) { |
||
| 32 | DomainAddressType::Person => 'person', |
||
| 33 | DomainAddressType::Company => 'company', |
||
| 34 | }; |
||
| 46 |