File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace GraphQL \Types ;
4+
5+ /**
6+ * Class GraphQLEnumValue
7+ * @package GraphQL\Types
8+ */
9+ class GraphQLEnumValue
10+ {
11+
12+ private $ id ;
13+ private $ description ;
14+ private $ deprecationReason ;
15+
16+ /**
17+ * GraphQLEnumValue constructor.
18+ * @param string $id
19+ * @param string $description
20+ * @param string|null $deprecationReason
21+ */
22+ public function __construct (string $ id , string $ description = "" , ?string $ deprecationReason = null )
23+ {
24+ $ this ->id = $ id ;
25+ $ this ->description = $ description ;
26+ $ this ->deprecationReason = $ deprecationReason ?? null ;
27+ }
28+
29+ /**
30+ * @return string
31+ */
32+ public function getName (): string
33+ {
34+ return $ this ->id ;
35+ }
36+
37+ /**
38+ * @return string
39+ */
40+ public function getDescription (): string
41+ {
42+ return $ this ->description ;
43+ }
44+
45+ /**
46+ * @return ?string
47+ */
48+ public function getDeprecationReason (): ?string
49+ {
50+ return $ this ->deprecationReason ;
51+ }
52+ }
You can’t perform that action at this time.
0 commit comments