Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
91.67% |
11 / 12 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| MixedTypes | |
91.67% |
11 / 12 |
|
50.00% |
1 / 2 |
2.00 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getDiscriminatorMapping | |
100.00% |
11 / 11 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Fixtures\Entities\Polymorphic; |
| 3 | |
| 4 | use Apie\Core\Entities\PolymorphicEntityInterface; |
| 5 | |
| 6 | abstract class MixedTypes implements PolymorphicEntityInterface |
| 7 | { |
| 8 | protected MixedTypesIdentifier $id; |
| 9 | |
| 10 | public function getId(): MixedTypesIdentifier |
| 11 | { |
| 12 | return $this->id; |
| 13 | } |
| 14 | public static function getDiscriminatorMapping(): \Apie\Core\Other\DiscriminatorMapping |
| 15 | { |
| 16 | return new \Apie\Core\Other\DiscriminatorMapping( |
| 17 | 'type', |
| 18 | new \Apie\Core\Other\DiscriminatorConfig( |
| 19 | 'integer', |
| 20 | IntegerType::class |
| 21 | ), |
| 22 | new \Apie\Core\Other\DiscriminatorConfig( |
| 23 | 'string', |
| 24 | StringType::class |
| 25 | ), |
| 26 | ); |
| 27 | } |
| 28 | } |