Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
Mammal
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 isCapableOfLayingEggs
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getDiscriminatorMapping
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\IntegrationTests\Apie\TypeDemo\Entities;
3
4use Apie\Core\Other\DiscriminatorConfig;
5use Apie\Core\Other\DiscriminatorMapping;
6use Apie\IntegrationTests\Apie\TypeDemo\Resources\Animal;
7
8abstract class Mammal extends Animal
9{
10    public function isCapableOfLayingEggs(): bool
11    {
12        return false;
13    }
14
15    public static function getDiscriminatorMapping(): DiscriminatorMapping
16    {
17        return new DiscriminatorMapping(
18            'name',
19            new DiscriminatorConfig('elephant', Elephant::class),
20            new DiscriminatorConfig('platypus', Platypus::class),
21            new DiscriminatorConfig('human', Human::class),
22        );
23    }
24}