Skip to content

Commit 36a124c

Browse files
authored
hide php8.1 deprecated messages
ex: Deprecated: Return type of cli\Arguments::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
1 parent a286685 commit 36a124c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/cli/Arguments.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public function asJSON() {
8686
* @param mixed $offset An Argument object or the name of the argument.
8787
* @return bool
8888
*/
89+
#[\ReturnTypeWillChange]
8990
public function offsetExists($offset) {
9091
if ($offset instanceOf Argument) {
9192
$offset = $offset->key;
@@ -100,6 +101,7 @@ public function offsetExists($offset) {
100101
* @param mixed $offset An Argument object or the name of the argument.
101102
* @return mixed
102103
*/
104+
#[\ReturnTypeWillChange]
103105
public function offsetGet($offset) {
104106
if ($offset instanceOf Argument) {
105107
$offset = $offset->key;
@@ -116,6 +118,7 @@ public function offsetGet($offset) {
116118
* @param mixed $offset An Argument object or the name of the argument.
117119
* @param mixed $value The value to set
118120
*/
121+
#[\ReturnTypeWillChange]
119122
public function offsetSet($offset, $value) {
120123
if ($offset instanceOf Argument) {
121124
$offset = $offset->key;
@@ -129,6 +132,7 @@ public function offsetSet($offset, $value) {
129132
*
130133
* @param mixed $offset An Argument object or the name of the argument.
131134
*/
135+
#[\ReturnTypeWillChange]
132136
public function offsetUnset($offset) {
133137
if ($offset instanceOf Argument) {
134138
$offset = $offset->key;

0 commit comments

Comments
 (0)