Skip to content

Commit

Permalink
Add ReturnTypeWillChange attribute to supress warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuasha420 committed Nov 30, 2022
1 parent 6930f15 commit 575cc70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/Core/REST_API/Data_Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ public function __isset( $name ) {
*
* @return bool
*/
// phpcs:disable Squiz.Commenting.InlineComment.WrongStyle,Squiz.Commenting.FunctionComment.WrongStyle, Squiz.PHP.CommentedOutCode.Found
#[\ReturnTypeWillChange]
public function offsetExists( $key ) {
return array_key_exists( $key, $this->data );
}
Expand All @@ -132,6 +134,8 @@ public function offsetExists( $key ) {
*
* @return mixed
*/
// phpcs:disable Squiz.Commenting.InlineComment.WrongStyle,Squiz.Commenting.FunctionComment.WrongStyle, Squiz.PHP.CommentedOutCode.Found
#[\ReturnTypeWillChange]
public function offsetGet( $key ) {
if ( $this->offsetExists( $key ) ) {
return $this->data[ $key ];
Expand All @@ -146,6 +150,8 @@ public function offsetGet( $key ) {
* @param string|int $key Key to set the value for.
* @param mixed $value New value for the given key.
*/
// phpcs:disable Squiz.Commenting.InlineComment.WrongStyle,Squiz.Commenting.FunctionComment.WrongStyle, Squiz.PHP.CommentedOutCode.Found
#[\ReturnTypeWillChange]
public function offsetSet( $key, $value ) {
// Data is immutable.
}
Expand All @@ -155,6 +161,8 @@ public function offsetSet( $key, $value ) {
*
* @param string|int $key Key to unset.
*/
// phpcs:disable Squiz.Commenting.InlineComment.WrongStyle,Squiz.Commenting.FunctionComment.WrongStyle, Squiz.PHP.CommentedOutCode.Found
#[\ReturnTypeWillChange]
public function offsetUnset( $key ) {
// Data is immutable.
}
Expand Down

0 comments on commit 575cc70

Please sign in to comment.