Use default for Psalm ensureOverrideAttribute (#923)

* Use default for Psalm ensureOverrideAttribute

* Fix missing Override attributes

Error: ../src/Curl/CaseInsensitiveArray.php:66:5:
MissingOverrideAttribute: Method Curl\CaseInsensitiveArray::offsetset
should have the "Override" attribute (see https://psalm.dev/358)
This commit is contained in:
Zach Borboa
2025-02-18 21:49:22 -05:00
committed by GitHub
parent 214cfe01db
commit 056de7d13d
4 changed files with 43 additions and 1 deletions
+10
View File
@@ -63,6 +63,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return void
* @see https://secure.php.net/manual/en/arrayaccess.offsetset.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
@@ -85,6 +86,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return bool If the offset exists.
* @see https://secure.php.net/manual/en/arrayaccess.offsetexists.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
@@ -101,6 +103,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return void
* @see https://secure.php.net/manual/en/arrayaccess.offsetunset.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
@@ -119,6 +122,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return mixed The data stored at the offset.
* @see https://secure.php.net/manual/en/arrayaccess.offsetget.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
@@ -132,6 +136,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return int The number of elements stored in the array.
* @see https://secure.php.net/manual/en/countable.count.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function count()
{
@@ -144,6 +149,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return mixed Data at the current position.
* @see https://secure.php.net/manual/en/iterator.current.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function current()
{
@@ -156,6 +162,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return void
* @see https://secure.php.net/manual/en/iterator.next.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function next()
{
@@ -168,6 +175,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return mixed Case-sensitive key at current position.
* @see https://secure.php.net/manual/en/iterator.key.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function key()
{
@@ -181,6 +189,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return bool If the current position is valid.
* @see https://secure.php.net/manual/en/iterator.valid.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function valid()
{
@@ -193,6 +202,7 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
* @return void
* @see https://secure.php.net/manual/en/iterator.rewind.php
*/
#[\Override]
#[\ReturnTypeWillChange]
public function rewind()
{