Skip to content

Commit

Permalink
Legacy PHP8.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
SecondeJK committed Feb 4, 2022
1 parent abd4047 commit 0e5c6bf
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Account/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function offsetExists($offset): bool
return isset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
trigger_error(
Expand Down
1 change: 1 addition & 0 deletions src/Account/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public function offsetExists($offset): bool
return isset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
trigger_error(
Expand Down
1 change: 1 addition & 0 deletions src/Account/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public function offsetExists($offset): bool
return isset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
trigger_error(
Expand Down
1 change: 1 addition & 0 deletions src/Client/Credentials/AbstractCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function offsetExists($offset): bool
return isset($this->credentials[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->credentials[$offset];
Expand Down
1 change: 1 addition & 0 deletions src/Conversations/Conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public function get(): Conversation
/**
* @return array|mixed
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->data;
Expand Down
5 changes: 4 additions & 1 deletion src/Entity/CollectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ abstract public function hydrateEntity($data, $id);
/**
* Return the current item, expects concrete collection to handle creating the object.
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->hydrateEntity($this->page['_embedded'][static::getCollectionName()][$this->current], $this->key());
Expand All @@ -100,6 +101,7 @@ public function next(): void
*
* @return string|int
*/
#[\ReturnTypeWillChange]
public function key()
{
return
Expand Down Expand Up @@ -158,7 +160,8 @@ public function rewind(): void

/**
* Count of total items
*/
*/#
#[\ReturnTypeWillChange]
public function count(): ?int
{
if (isset($this->page)) {
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/IterableAPICollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public function getResourceRoot(): array
* @throws ClientException\Request
* @throws ClientException\Server
*/
#[\ReturnTypeWillChange]
public function current()
{
if (is_null($this->current)) {
Expand All @@ -207,6 +208,7 @@ public function next(): void
*
* @return string
*/
#[\ReturnTypeWillChange]
public function key()
{
return
Expand Down
2 changes: 2 additions & 0 deletions src/Entity/IterableServiceShimTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function count(): int
*
* @deprecated This will be removed in a future release, and will be part of a search response
*/
#[\ReturnTypeWillChange]
public function current()
{
if (is_null($this->collection)) {
Expand Down Expand Up @@ -114,6 +115,7 @@ public function next(): void
*
* @deprecated This will be removed in a future release, and will be part of a search response
*/
#[\ReturnTypeWillChange]
public function key()
{
if (is_null($this->collection)) {
Expand Down
2 changes: 2 additions & 0 deletions src/Insights/Basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function getCountryPrefix(): int
/**
* @return array|mixed
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
Expand Down Expand Up @@ -98,6 +99,7 @@ public function offsetExists($offset): bool
return isset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
trigger_error(
Expand Down
1 change: 1 addition & 0 deletions src/Message/InboundMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ public function offsetExists($offset): bool
*
* @throws Exception
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
trigger_error(
Expand Down
4 changes: 4 additions & 0 deletions src/Message/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ public function offsetExists($offset): bool
* @throws ClientException
* @throws Exception
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
trigger_error(
Expand Down Expand Up @@ -456,6 +457,7 @@ protected function getReadOnlyException($offset): RuntimeException
/**
* @throws Exception
*/
#[\ReturnTypeWillChange]
public function current()
{
if (!isset($this->response)) {
Expand All @@ -471,6 +473,7 @@ public function next(): void
$this->current++;
}

#[\ReturnTypeWillChange]
public function key()
{
if (!isset($this->response)) {
Expand All @@ -483,6 +486,7 @@ public function key()
/**
* @throws Exception
*/
#[\ReturnTypeWillChange]
public function valid(): ?bool
{
if (!isset($this->response)) {
Expand Down
1 change: 1 addition & 0 deletions src/Numbers/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ public function fromArray(array $data): void
/**
* @return array|mixed
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
Expand Down
2 changes: 2 additions & 0 deletions src/SMS/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function count(): int
return (int)$this->data['message-count'];
}

#[\ReturnTypeWillChange]
public function current(): SentSMS
{
return new SentSMS($this->data['messages'][$this->current]);
Expand All @@ -44,6 +45,7 @@ public function current(): SentSMS
/**
* @return bool|float|int|string|null
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->current;
Expand Down
1 change: 1 addition & 0 deletions src/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function getConversations()
/**
* @return array|mixed
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->data;
Expand Down
1 change: 1 addition & 0 deletions src/Voice/NCCO/Action/Connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public static function factory(EndpointInterface $endpoint, array $data = []): C
/**
* @return array|mixed
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toNCCOArray();
Expand Down

0 comments on commit 0e5c6bf

Please sign in to comment.