Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
Bird
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 isCapableOfFlying
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getDiscriminatorMapping
100.00% covered (success)
100.00%
5 / 5
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 Bird extends Animal
9{
10    public function isCapableOfFlying(): bool
11    {
12        return true;
13    }
14
15    public static function getDiscriminatorMapping(): DiscriminatorMapping
16    {
17        return new DiscriminatorMapping(
18            'name',
19            new DiscriminatorConfig('ostrich', Ostrich::class),
20            new DiscriminatorConfig('seagull', Seagull::class),
21        );
22    }
23}