@@ -33,11 +33,12 @@ final class CypherMap extends Map
33
33
*
34
34
* @return CypherMap<mixed>
35
35
*/
36
- public function getAsCypherMap (int $ key , $ default = null ): CypherMap
36
+ public function getAsCypherMap (string $ key , $ default = null ): CypherMap
37
37
{
38
38
if (func_num_args () === 1 ) {
39
39
$ value = $ this ->get ($ key );
40
40
} else {
41
+ /** @var mixed */
41
42
$ value = $ this ->get ($ key , $ default );
42
43
}
43
44
$ tbr = TypeCaster::toCypherMap ($ value );
@@ -53,11 +54,12 @@ public function getAsCypherMap(int $key, $default = null): CypherMap
53
54
*
54
55
* @return CypherList<mixed>
55
56
*/
56
- public function getAsCypherList (int $ key , $ default = null ): CypherList
57
+ public function getAsCypherList (string $ key , $ default = null ): CypherList
57
58
{
58
59
if (func_num_args () === 1 ) {
59
60
$ value = $ this ->get ($ key );
60
61
} else {
62
+ /** @var mixed */
61
63
$ value = $ this ->get ($ key , $ default );
62
64
}
63
65
$ tbr = TypeCaster::toCypherList ($ value );
@@ -71,7 +73,7 @@ public function getAsCypherList(int $key, $default = null): CypherList
71
73
/**
72
74
* @param mixed $default
73
75
*/
74
- public function getAsDate (int $ key , $ default = null ): Date
76
+ public function getAsDate (string $ key , $ default = null ): Date
75
77
{
76
78
if (func_num_args () === 1 ) {
77
79
return $ this ->getAsObject ($ key , Date::class);
@@ -83,7 +85,7 @@ public function getAsDate(int $key, $default = null): Date
83
85
/**
84
86
* @param mixed $default
85
87
*/
86
- public function getAsDateTime (int $ key , $ default = null ): DateTime
88
+ public function getAsDateTime (string $ key , $ default = null ): DateTime
87
89
{
88
90
if (func_num_args () === 1 ) {
89
91
return $ this ->getAsObject ($ key , DateTime::class);
@@ -95,7 +97,7 @@ public function getAsDateTime(int $key, $default = null): DateTime
95
97
/**
96
98
* @param mixed $default
97
99
*/
98
- public function getAsDuration (int $ key , $ default = null ): Duration
100
+ public function getAsDuration (string $ key , $ default = null ): Duration
99
101
{
100
102
if (func_num_args () === 1 ) {
101
103
return $ this ->getAsObject ($ key , Duration::class);
@@ -107,7 +109,7 @@ public function getAsDuration(int $key, $default = null): Duration
107
109
/**
108
110
* @param mixed $default
109
111
*/
110
- public function getAsLocalDateTime (int $ key , $ default = null ): LocalDateTime
112
+ public function getAsLocalDateTime (string $ key , $ default = null ): LocalDateTime
111
113
{
112
114
if (func_num_args () === 1 ) {
113
115
return $ this ->getAsObject ($ key , LocalDateTime::class);
@@ -119,7 +121,7 @@ public function getAsLocalDateTime(int $key, $default = null): LocalDateTime
119
121
/**
120
122
* @param mixed $default
121
123
*/
122
- public function getAsLocalTime (int $ key , $ default = null ): LocalTime
124
+ public function getAsLocalTime (string $ key , $ default = null ): LocalTime
123
125
{
124
126
if (func_num_args () === 1 ) {
125
127
return $ this ->getAsObject ($ key , LocalTime::class);
@@ -131,7 +133,7 @@ public function getAsLocalTime(int $key, $default = null): LocalTime
131
133
/**
132
134
* @param mixed $default
133
135
*/
134
- public function getAsTime (int $ key , $ default = null ): Time
136
+ public function getAsTime (string $ key , $ default = null ): Time
135
137
{
136
138
if (func_num_args () === 1 ) {
137
139
return $ this ->getAsObject ($ key , Time::class);
@@ -143,7 +145,7 @@ public function getAsTime(int $key, $default = null): Time
143
145
/**
144
146
* @param mixed $default
145
147
*/
146
- public function getAsNode (int $ key , $ default = null ): Node
148
+ public function getAsNode (string $ key , $ default = null ): Node
147
149
{
148
150
if (func_num_args () === 1 ) {
149
151
return $ this ->getAsObject ($ key , Node::class);
@@ -155,7 +157,7 @@ public function getAsNode(int $key, $default = null): Node
155
157
/**
156
158
* @param mixed $default
157
159
*/
158
- public function getAsRelationship (int $ key , $ default = null ): Relationship
160
+ public function getAsRelationship (string $ key , $ default = null ): Relationship
159
161
{
160
162
if (func_num_args () === 1 ) {
161
163
return $ this ->getAsObject ($ key , Relationship::class);
@@ -167,7 +169,7 @@ public function getAsRelationship(int $key, $default = null): Relationship
167
169
/**
168
170
* @param mixed $default
169
171
*/
170
- public function getAsPath (int $ key , $ default = null ): Path
172
+ public function getAsPath (string $ key , $ default = null ): Path
171
173
{
172
174
if (func_num_args () === 1 ) {
173
175
return $ this ->getAsObject ($ key , Path::class);
@@ -179,7 +181,7 @@ public function getAsPath(int $key, $default = null): Path
179
181
/**
180
182
* @param mixed $default
181
183
*/
182
- public function getAsCartesian3DPoint (int $ key , $ default = null ): Cartesian3DPoint
184
+ public function getAsCartesian3DPoint (string $ key , $ default = null ): Cartesian3DPoint
183
185
{
184
186
if (func_num_args () === 1 ) {
185
187
return $ this ->getAsObject ($ key , Cartesian3DPoint::class);
@@ -191,7 +193,7 @@ public function getAsCartesian3DPoint(int $key, $default = null): Cartesian3DPoi
191
193
/**
192
194
* @param mixed $default
193
195
*/
194
- public function getAsCartesianPoint (int $ key , $ default = null ): CartesianPoint
196
+ public function getAsCartesianPoint (string $ key , $ default = null ): CartesianPoint
195
197
{
196
198
if (func_num_args () === 1 ) {
197
199
return $ this ->getAsObject ($ key , CartesianPoint::class);
@@ -203,7 +205,7 @@ public function getAsCartesianPoint(int $key, $default = null): CartesianPoint
203
205
/**
204
206
* @param mixed $default
205
207
*/
206
- public function getAsWGS84Point (int $ key , $ default = null ): WGS84Point
208
+ public function getAsWGS84Point (string $ key , $ default = null ): WGS84Point
207
209
{
208
210
if (func_num_args () === 1 ) {
209
211
return $ this ->getAsObject ($ key , WGS84Point::class);
@@ -215,7 +217,7 @@ public function getAsWGS84Point(int $key, $default = null): WGS84Point
215
217
/**
216
218
* @param mixed $default
217
219
*/
218
- public function getAsWGS843DPoint (int $ key , $ default = null ): WGS843DPoint
220
+ public function getAsWGS843DPoint (string $ key , $ default = null ): WGS843DPoint
219
221
{
220
222
if (func_num_args () === 1 ) {
221
223
return $ this ->getAsObject ($ key , WGS843DPoint::class);
0 commit comments