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\DefinitionInterface; |
||
14 | |||
15 | /** |
||
16 | * Trait DefinitionTrait |
||
17 | */ |
||
18 | trait DefinitionTrait |
||
19 | { |
||
20 | use MetaAwareTrait; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $name; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description; |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | 74 | public function getName(): ?string |
|
36 | { |
||
37 | 74 | return $this->name; |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param string $name |
||
42 | * |
||
43 | * @return DefinitionInterface |
||
44 | */ |
||
45 | 87 | public function setName(?string $name): DefinitionInterface |
|
46 | { |
||
47 | 87 | $this->name = $name; |
|
48 | |||
49 | 87 | return $this; |
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | 3 | public function getDescription(): ?string |
|
56 | { |
||
57 | 3 | return $this->description; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @param string $description |
||
62 | * |
||
63 | * @return DefinitionInterface |
||
64 | */ |
||
65 | 38 | public function setDescription(?string $description): DefinitionInterface |
|
66 | { |
||
67 | 38 | $this->description = $description; |
|
68 | |||
69 | 38 | return $this; |
|
0 ignored issues
–
show
|
|||
70 | } |
||
71 | } |
||
72 |