Completed
Pull Request — master (#13)
by Rafael
06:46
created

PolymorphicObjectTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 15
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConcreteType() 0 3 1
A setConcreteType() 0 3 1
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Model;
12
13
/**
14
 * Can use this trait with PolymorphicObjectInterface
15
 * to set types in runtime
16
 */
17
trait PolymorphicObjectTrait
18
{
19
    /**
20
     * @var string
21
     */
22
    protected $concreteType;
23
24
    public function getConcreteType(): string
25
    {
26
        return $this->concreteType;
27
    }
28
29
    public function setConcreteType($type)
30
    {
31
        $this->concreteType = $type;
32
    }
33
}
34