summaryrefslogtreecommitdiffstats
path: root/vendor/stripe/stripe-php/lib/Util/Set.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
commit75160b12821f7f4299cce7f0b69c83c1502ae071 (patch)
tree27e25e4ccaef45f0c58b22831164050d1af1d4db /vendor/stripe/stripe-php/lib/Util/Set.php
parentprvi-commit (diff)
download1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip
Diffstat (limited to 'vendor/stripe/stripe-php/lib/Util/Set.php')
-rw-r--r--vendor/stripe/stripe-php/lib/Util/Set.php92
1 files changed, 48 insertions, 44 deletions
diff --git a/vendor/stripe/stripe-php/lib/Util/Set.php b/vendor/stripe/stripe-php/lib/Util/Set.php
index 017f929..57caab1 100644
--- a/vendor/stripe/stripe-php/lib/Util/Set.php
+++ b/vendor/stripe/stripe-php/lib/Util/Set.php
@@ -1,44 +1,48 @@
-<?php
-
-namespace Stripe\Util;
-
-use ArrayIterator;
-use IteratorAggregate;
-
-class Set implements IteratorAggregate
-{
- private $_elts;
-
- public function __construct($members = [])
- {
- $this->_elts = [];
- foreach ($members as $item) {
- $this->_elts[$item] = true;
- }
- }
-
- public function includes($elt)
- {
- return isset($this->_elts[$elt]);
- }
-
- public function add($elt)
- {
- $this->_elts[$elt] = true;
- }
-
- public function discard($elt)
- {
- unset($this->_elts[$elt]);
- }
-
- public function toArray()
- {
- return \array_keys($this->_elts);
- }
-
- public function getIterator()
- {
- return new ArrayIterator($this->toArray());
- }
-}
+<?php
+
+namespace Stripe\Util;
+
+use ArrayIterator;
+use IteratorAggregate;
+
+class Set implements IteratorAggregate
+{
+ private $_elts;
+
+ public function __construct($members = [])
+ {
+ $this->_elts = [];
+ foreach ($members as $item) {
+ $this->_elts[$item] = true;
+ }
+ }
+
+ public function includes($elt)
+ {
+ return isset($this->_elts[$elt]);
+ }
+
+ public function add($elt)
+ {
+ $this->_elts[$elt] = true;
+ }
+
+ public function discard($elt)
+ {
+ unset($this->_elts[$elt]);
+ }
+
+ public function toArray()
+ {
+ return \array_keys($this->_elts);
+ }
+
+ /**
+ * @return ArrayIterator
+ */
+ #[\ReturnTypeWillChange]
+ public function getIterator()
+ {
+ return new ArrayIterator($this->toArray());
+ }
+}