From ceb3ab077cf037bb95701d073e8dec820fa3b967 Mon Sep 17 00:00:00 2001 From: Maximilien Rozniecki Date: Tue, 25 Apr 2023 09:37:03 +0200 Subject: [PATCH] remove includes from modification --- .../includes/stripe/stripe-php/lib/Collection.php | 8 +++----- .../stripe/stripe-php/lib/StripeObject.php | 12 ++++++------ .../stripe-php/lib/Util/CaseInsensitiveArray.php | 14 ++++++-------- htdocs/includes/stripe/stripe-php/lib/Util/Set.php | 3 +-- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/htdocs/includes/stripe/stripe-php/lib/Collection.php b/htdocs/includes/stripe/stripe-php/lib/Collection.php index ab4536041d6..899299d3dad 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Collection.php +++ b/htdocs/includes/stripe/stripe-php/lib/Collection.php @@ -2,8 +2,6 @@ namespace Stripe; -use Traversable; - /** * Class Collection. * @@ -49,7 +47,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate $this->filters = $filters; } - public function offsetGet($k): mixed + public function offsetGet($k) { if (\is_string($k)) { return parent::offsetGet($k); @@ -109,7 +107,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate /** * @return int the number of objects in the current page */ - public function count(): int + public function count() { return \count($this->data); } @@ -118,7 +116,7 @@ class Collection extends StripeObject implements \Countable, \IteratorAggregate * @return \ArrayIterator an iterator that can be used to iterate * across objects in the current page */ - public function getIterator(): Traversable + public function getIterator() { return new \ArrayIterator($this->data); } diff --git a/htdocs/includes/stripe/stripe-php/lib/StripeObject.php b/htdocs/includes/stripe/stripe-php/lib/StripeObject.php index 8bb146138b1..eca01a00e90 100644 --- a/htdocs/includes/stripe/stripe-php/lib/StripeObject.php +++ b/htdocs/includes/stripe/stripe-php/lib/StripeObject.php @@ -194,28 +194,28 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable } // ArrayAccess methods - public function offsetSet($k, $v): void + public function offsetSet($k, $v) { $this->{$k} = $v; } - public function offsetExists($k): bool + public function offsetExists($k) { return \array_key_exists($k, $this->_values); } - public function offsetUnset($k): void + public function offsetUnset($k) { unset($this->{$k}); } - public function offsetGet($k): mixed + public function offsetGet($k) { return \array_key_exists($k, $this->_values) ? $this->_values[$k] : null; } // Countable method - public function count(): int + public function count() { return \count($this->_values); } @@ -419,7 +419,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable } } - public function jsonSerialize(): mixed + public function jsonSerialize() { return $this->toArray(); } diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php b/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php index c1aad379438..670ab0b6a7e 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php @@ -2,8 +2,6 @@ namespace Stripe\Util; -use Traversable; - /** * CaseInsensitiveArray is an array-like class that ignores case for keys. * @@ -23,17 +21,17 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \IteratorAggrega $this->container = \array_change_key_case($initial_array, \CASE_LOWER); } - public function count(): int + public function count() { return \count($this->container); } - public function getIterator(): Traversable + public function getIterator() { return new \ArrayIterator($this->container); } - public function offsetSet($offset, $value): void + public function offsetSet($offset, $value) { $offset = static::maybeLowercase($offset); if (null === $offset) { @@ -43,20 +41,20 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \IteratorAggrega } } - public function offsetExists($offset): bool + public function offsetExists($offset) { $offset = static::maybeLowercase($offset); return isset($this->container[$offset]); } - public function offsetUnset($offset): void + public function offsetUnset($offset) { $offset = static::maybeLowercase($offset); unset($this->container[$offset]); } - public function offsetGet($offset): mixed + public function offsetGet($offset) { $offset = static::maybeLowercase($offset); diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/Set.php b/htdocs/includes/stripe/stripe-php/lib/Util/Set.php index 54b363cd4b3..017f9297856 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/Set.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/Set.php @@ -4,7 +4,6 @@ namespace Stripe\Util; use ArrayIterator; use IteratorAggregate; -use Traversable; class Set implements IteratorAggregate { @@ -38,7 +37,7 @@ class Set implements IteratorAggregate return \array_keys($this->_elts); } - public function getIterator(): Traversable + public function getIterator() { return new ArrayIterator($this->toArray()); }