Skip to content

Commit

Permalink
Merge pull request #10 from kartenmacherei/refactor/adding-return-types
Browse files Browse the repository at this point in the history
Refactor: Make it possible to run this package with php8.2
  • Loading branch information
eniebuhr authored Oct 9, 2023
2 parents d971e81 + b5b083b commit 0278655
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
},
"require": {
"php" : ">=7.0.0",
"php" : ">=7.1.0",
"kartenmacherei/kam-newrelic": "^1.0"
},
"require-dev": {
Expand Down
9 changes: 5 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/JsonArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(array $data)
$this->data = $data;
}

public function current()
public function current(): mixed
{
$current = current($this->data);
if (is_array($current)) {
Expand All @@ -28,12 +28,12 @@ public function current()
return $current;
}

public function next()
public function next(): void
{
next($this->data);
}

public function key()
public function key(): mixed
{
return key($this->data);
}
Expand All @@ -46,7 +46,7 @@ public function valid():bool
return array_key_exists($this->key(), $this->data);
}

public function rewind()
public function rewind(): void
{
reset($this->data);
}
Expand Down

0 comments on commit 0278655

Please sign in to comment.