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
Fish
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
 isCapableOfWalkingOnWater
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 Fish extends Animal
9{
10    public function isCapableOfWalkingOnWater(): bool
11    {
12        return false;
13    }
14
15    public static function getDiscriminatorMapping(): DiscriminatorMapping
16    {
17        return new DiscriminatorMapping(
18            'name',
19            new DiscriminatorConfig('shark', Shark::class),
20            new DiscriminatorConfig('lungfish', Lungfish::class),
21        );
22    }
23}