Skip to content

Commit 0e5c6bf

Browse files
committed
Legacy PHP8.1 support
1 parent abd4047 commit 0e5c6bf

File tree

15 files changed

+25
-1
lines changed

15 files changed

+25
-1
lines changed

src/Account/Balance.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function offsetExists($offset): bool
8282
return isset($this->data[$offset]);
8383
}
8484

85+
#[\ReturnTypeWillChange]
8586
public function offsetGet($offset)
8687
{
8788
trigger_error(

src/Account/Config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public function offsetExists($offset): bool
142142
return isset($this->data[$offset]);
143143
}
144144

145+
#[\ReturnTypeWillChange]
145146
public function offsetGet($offset)
146147
{
147148
trigger_error(

src/Account/Price.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ public function offsetExists($offset): bool
186186
return isset($this->data[$offset]);
187187
}
188188

189+
#[\ReturnTypeWillChange]
189190
public function offsetGet($offset)
190191
{
191192
trigger_error(

src/Client/Credentials/AbstractCredentials.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function offsetExists($offset): bool
2828
return isset($this->credentials[$offset]);
2929
}
3030

31+
#[\ReturnTypeWillChange]
3132
public function offsetGet($offset)
3233
{
3334
return $this->credentials[$offset];

src/Conversations/Conversation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public function get(): Conversation
109109
/**
110110
* @return array|mixed
111111
*/
112+
#[\ReturnTypeWillChange]
112113
public function jsonSerialize()
113114
{
114115
return $this->data;

src/Entity/CollectionTrait.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ abstract public function hydrateEntity($data, $id);
8282
/**
8383
* Return the current item, expects concrete collection to handle creating the object.
8484
*/
85+
#[\ReturnTypeWillChange]
8586
public function current()
8687
{
8788
return $this->hydrateEntity($this->page['_embedded'][static::getCollectionName()][$this->current], $this->key());
@@ -100,6 +101,7 @@ public function next(): void
100101
*
101102
* @return string|int
102103
*/
104+
#[\ReturnTypeWillChange]
103105
public function key()
104106
{
105107
return
@@ -158,7 +160,8 @@ public function rewind(): void
158160

159161
/**
160162
* Count of total items
161-
*/
163+
*/#
164+
#[\ReturnTypeWillChange]
162165
public function count(): ?int
163166
{
164167
if (isset($this->page)) {

src/Entity/IterableAPICollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ public function getResourceRoot(): array
185185
* @throws ClientException\Request
186186
* @throws ClientException\Server
187187
*/
188+
#[\ReturnTypeWillChange]
188189
public function current()
189190
{
190191
if (is_null($this->current)) {
@@ -207,6 +208,7 @@ public function next(): void
207208
*
208209
* @return string
209210
*/
211+
#[\ReturnTypeWillChange]
210212
public function key()
211213
{
212214
return

src/Entity/IterableServiceShimTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function count(): int
8484
*
8585
* @deprecated This will be removed in a future release, and will be part of a search response
8686
*/
87+
#[\ReturnTypeWillChange]
8788
public function current()
8889
{
8990
if (is_null($this->collection)) {
@@ -114,6 +115,7 @@ public function next(): void
114115
*
115116
* @deprecated This will be removed in a future release, and will be part of a search response
116117
*/
118+
#[\ReturnTypeWillChange]
117119
public function key()
118120
{
119121
if (is_null($this->collection)) {

src/Insights/Basic.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function getCountryPrefix(): int
7070
/**
7171
* @return array|mixed
7272
*/
73+
#[\ReturnTypeWillChange]
7374
public function jsonSerialize()
7475
{
7576
return $this->toArray();
@@ -98,6 +99,7 @@ public function offsetExists($offset): bool
9899
return isset($this->data[$offset]);
99100
}
100101

102+
#[\ReturnTypeWillChange]
101103
public function offsetGet($offset)
102104
{
103105
trigger_error(

src/Message/InboundMessage.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ public function offsetExists($offset): bool
210210
*
211211
* @throws Exception
212212
*/
213+
#[\ReturnTypeWillChange]
213214
public function offsetGet($offset)
214215
{
215216
trigger_error(

0 commit comments

Comments
 (0)