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\Definition\Traits; |
||
12 | |||
13 | use Ynlo\GraphQLBundle\Definition\ClassAwareDefinitionInterface; |
||
14 | |||
15 | /** |
||
16 | * Trait ClassAwareDefinitionTrait |
||
17 | */ |
||
18 | trait ClassAwareDefinitionTrait |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $class; |
||
24 | |||
25 | /** |
||
26 | * @return string |
||
27 | */ |
||
28 | 48 | public function getClass(): ?string |
|
29 | { |
||
30 | 48 | return $this->class; |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param string $class |
||
35 | * |
||
36 | * @return ClassAwareDefinitionInterface |
||
37 | */ |
||
38 | 83 | public function setClass(?string $class): ClassAwareDefinitionInterface |
|
39 | { |
||
40 | 83 | $this->class = $class; |
|
41 | |||
42 | 83 | return $this; |
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
43 | } |
||
44 | } |
||
45 |