Skip to content

Commit e579f3a

Browse files
authored
Merge pull request #1 from andriusbaliutis/master
Make package compatible with php version 8. Extending Stack.php over…
2 parents f69c4fe + bf2c520 commit e579f3a

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

composer.json

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
2-
"name": "chroma-x/stack-util",
3-
"type": "library",
4-
"description": "A PHP library providing common stack implementation.",
5-
"keywords": [
6-
"stack"
7-
],
8-
"homepage": "http://chroma-x.de/",
9-
"license": "MIT",
10-
"authors": [
11-
{
12-
"name": "Martin Brecht-Precht",
13-
"email": "[email protected]",
14-
"homepage": "http://chroma-x.de"
15-
}
16-
],
17-
"autoload": {
18-
"psr-4": {
19-
"ChromaX\\StackUtil\\": "src/"
20-
}
21-
},
22-
"require": {
23-
"php": ">=5.3"
24-
},
25-
"require-dev": {
26-
"phpunit/phpunit": ">=4.8.26",
27-
"codeclimate/php-test-reporter": "dev-master"
28-
}
2+
"name": "chroma-x/stack-util",
3+
"type": "library",
4+
"description": "A PHP library providing common stack implementation.",
5+
"keywords": [
6+
"stack"
7+
],
8+
"homepage": "https://chroma-x.de/",
9+
"license": "MIT",
10+
"authors": [
11+
{
12+
"name": "Martin Brecht-Precht",
13+
"email": "[email protected]",
14+
"homepage": "https://chroma-x.de"
15+
}
16+
],
17+
"autoload": {
18+
"psr-4": {
19+
"ChromaX\\StackUtil\\": "src/"
20+
}
21+
},
22+
"require": {
23+
"php": ">=5.3"
24+
},
25+
"require-dev": {
26+
"phpunit/phpunit": ">=4.8.26",
27+
"codeclimate/php-test-reporter": "dev-master"
28+
}
2929
}

src/Stack.php

+5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public function delete($index)
100100
* @link http://php.net/manual/en/iterator.current.php
101101
* @return mixed
102102
*/
103+
#[\ReturnTypeWillChange]
103104
public function current()
104105
{
105106
return $this->items[$this->cursor];
@@ -111,6 +112,7 @@ public function current()
111112
* @link http://php.net/manual/en/iterator.next.php
112113
* @return void
113114
*/
115+
#[\ReturnTypeWillChange]
114116
public function next()
115117
{
116118
++$this->cursor;
@@ -122,6 +124,7 @@ public function next()
122124
* @link http://php.net/manual/en/iterator.key.php
123125
* @return mixed scalar on success, or null on failure.
124126
*/
127+
#[\ReturnTypeWillChange]
125128
public function key()
126129
{
127130
return $this->cursor;
@@ -133,6 +136,7 @@ public function key()
133136
* @link http://php.net/manual/en/iterator.valid.php
134137
* @return boolean
135138
*/
139+
#[\ReturnTypeWillChange]
136140
public function valid()
137141
{
138142
return isset($this->items[$this->cursor]);
@@ -144,6 +148,7 @@ public function valid()
144148
* @link http://php.net/manual/en/iterator.rewind.php
145149
* @return void
146150
*/
151+
#[\ReturnTypeWillChange]
147152
public function rewind()
148153
{
149154
$this->cursor = 0;

0 commit comments

Comments
 (0)