File tree 5 files changed +12
-8
lines changed
5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public function offsetExists($offset): bool
39
39
* @param mixed $offset
40
40
* @return \DCarbone\PHPConsulAPI\Error|\DCarbone\PHPConsulAPI\QueryMeta|mixed|null
41
41
*/
42
+ #[\ReturnTypeWillChange]
42
43
public function offsetGet ($ offset )
43
44
{
44
45
if (0 === $ offset ) {
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ public function offsetExists($offset): bool
38
38
* @param mixed $offset
39
39
* @return \DCarbone\PHPConsulAPI\Error|mixed|null
40
40
*/
41
+ #[\ReturnTypeWillChange]
41
42
public function offsetGet ($ offset )
42
43
{
43
44
if (0 === $ offset ) {
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public function offsetExists($offset): bool
39
39
* @param mixed $offset
40
40
* @return \DCarbone\PHPConsulAPI\Error|\DCarbone\PHPConsulAPI\WriteMeta|mixed|null
41
41
*/
42
+ #[\ReturnTypeWillChange]
42
43
public function offsetGet ($ offset )
43
44
{
44
45
if (0 === $ offset ) {
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ public function append($value): void
73
73
/**
74
74
* @return \DCarbone\PHPConsulAPI\AbstractModel|false
75
75
*/
76
+ #[\ReturnTypeWillChange]
76
77
public function current ()
77
78
{
78
79
return current ($ this ->_list );
@@ -86,7 +87,7 @@ public function next(): void
86
87
/**
87
88
* @return int|null
88
89
*/
89
- public function key ()
90
+ public function key (): ? int
90
91
{
91
92
return key ($ this ->_list );
92
93
}
@@ -108,7 +109,7 @@ public function rewind(): void
108
109
* @param mixed $offset
109
110
* @return bool
110
111
*/
111
- public function offsetExists ($ offset )
112
+ public function offsetExists ($ offset ): bool
112
113
{
113
114
return \is_int ($ offset ) && isset ($ this ->_list [$ offset ]);
114
115
}
@@ -117,7 +118,7 @@ public function offsetExists($offset)
117
118
* @param mixed $offset
118
119
* @return \DCarbone\PHPConsulAPI\AbstractModel|null
119
120
*/
120
- public function offsetGet ($ offset )
121
+ public function offsetGet ($ offset ): ? AbstractModel
121
122
{
122
123
$ this ->_validateOffset ($ offset );
123
124
if (isset ($ this ->_list [$ offset ])) {
Original file line number Diff line number Diff line change @@ -99,9 +99,9 @@ public function toPsr7Array(): array
99
99
}
100
100
101
101
/**
102
- * @return array|string
102
+ * @return array
103
103
*/
104
- public function current ()
104
+ public function current (): array
105
105
{
106
106
return current ($ this ->values );
107
107
}
@@ -136,7 +136,7 @@ public function rewind(): void
136
136
* @param mixed $offset
137
137
* @return bool
138
138
*/
139
- public function offsetExists ($ offset )
139
+ public function offsetExists ($ offset ): bool
140
140
{
141
141
return isset ($ this ->values [$ offset ]);
142
142
}
@@ -145,7 +145,7 @@ public function offsetExists($offset)
145
145
* @param string $offset
146
146
* @return string
147
147
*/
148
- public function offsetGet ($ offset )
148
+ public function offsetGet ($ offset ): string
149
149
{
150
150
return $ this ->get ($ offset );
151
151
}
@@ -170,7 +170,7 @@ public function offsetUnset($offset): void
170
170
/**
171
171
* @return array
172
172
*/
173
- public function jsonSerialize ()
173
+ public function jsonSerialize (): array
174
174
{
175
175
return $ this ->values ;
176
176
}
You can’t perform that action at this time.
0 commit comments