mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Fix deprecation notice in rmccue/requests in PHP 8.2
This commit is contained in:
parent
c6bcad909e
commit
b122f35e62
1 changed files with 5 additions and 0 deletions
|
|
@ -60,6 +60,7 @@ class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate {
|
||||||
* @param string $key Item key
|
* @param string $key Item key
|
||||||
* @return boolean Does the item exist?
|
* @return boolean Does the item exist?
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function offsetExists($key) {
|
public function offsetExists($key) {
|
||||||
return isset($this->cookies[$key]);
|
return isset($this->cookies[$key]);
|
||||||
}
|
}
|
||||||
|
|
@ -70,6 +71,7 @@ class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate {
|
||||||
* @param string $key Item key
|
* @param string $key Item key
|
||||||
* @return string|null Item value (null if offsetExists is false)
|
* @return string|null Item value (null if offsetExists is false)
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function offsetGet($key) {
|
public function offsetGet($key) {
|
||||||
if (!isset($this->cookies[$key])) {
|
if (!isset($this->cookies[$key])) {
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -86,6 +88,7 @@ class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate {
|
||||||
* @param string $key Item name
|
* @param string $key Item name
|
||||||
* @param string $value Item value
|
* @param string $value Item value
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function offsetSet($key, $value) {
|
public function offsetSet($key, $value) {
|
||||||
if ($key === null) {
|
if ($key === null) {
|
||||||
throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
|
throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
|
||||||
|
|
@ -99,6 +102,7 @@ class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate {
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function offsetUnset($key) {
|
public function offsetUnset($key) {
|
||||||
unset($this->cookies[$key]);
|
unset($this->cookies[$key]);
|
||||||
}
|
}
|
||||||
|
|
@ -108,6 +112,7 @@ class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate {
|
||||||
*
|
*
|
||||||
* @return ArrayIterator
|
* @return ArrayIterator
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function getIterator() {
|
public function getIterator() {
|
||||||
return new ArrayIterator($this->cookies);
|
return new ArrayIterator($this->cookies);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue