Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve the default value problem of Transaction class in php8.1+ #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function __toString()
* @param string value
* @return void
*/
public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
$txKey = isset($this->attributeMap[$offset]) ? $this->attributeMap[$offset] : null;

Expand Down Expand Up @@ -289,7 +289,8 @@ public function offsetSet($offset, $value)
* @param string $offset key, eg: to
* @return bool
*/
public function offsetExists($offset)
#[\ReturnTypeWillChange]
public function offsetExists($offset):bool
{
$txKey = isset($this->attributeMap[$offset]) ? $this->attributeMap[$offset] : null;

Expand All @@ -305,7 +306,7 @@ public function offsetExists($offset)
* @param string $offset key, eg: to
* @return void
*/
public function offsetUnset($offset)
public function offsetUnset($offset):void
{
$txKey = isset($this->attributeMap[$offset]) ? $this->attributeMap[$offset] : null;

Expand All @@ -320,7 +321,7 @@ public function offsetUnset($offset)
* @param string $offset key, eg: to
* @return mixed value of the transaction
*/
public function offsetGet($offset)
public function offsetGet($offset):mixed
{
$txKey = isset($this->attributeMap[$offset]) ? $this->attributeMap[$offset] : null;

Expand Down