@@ -93,14 +93,14 @@ public function setContains(Value $value): bool
9393 *
9494 * Returns a Set which is the union of this Set with all passed Sets.
9595 *
96- * @param Value $set, ...
96+ * @param Value ...$sets One or more Sets
9797 */
98- public function union (Value $ set ): self
98+ public function union (Value ... $ sets ): self
9999 {
100100 $ union = $ this ->value ;
101101
102102 /** @var Value $arg */
103- foreach (\func_get_args () as $ arg ) {
103+ foreach ($ sets as $ arg ) {
104104 /** @var array $convertedArg */
105105 $ convertedArg = $ arg ->getSet ()->getValue ();
106106 $ union = \array_merge ($ union , \array_diff ($ convertedArg , $ union ));
@@ -114,14 +114,14 @@ public function union(Value $set): self
114114 *
115115 * Returns a Set which is the intersection of this Set with all passed sets.
116116 *
117- * @param Value $set, ...
117+ * @param Value ...$sets One or more Sets
118118 */
119- public function intersect (Value $ set ): self
119+ public function intersect (Value ... $ sets ): self
120120 {
121121 $ intersect = $ this ->value ;
122122
123123 /** @var Value $arg */
124- foreach (\func_get_args () as $ arg ) {
124+ foreach ($ sets as $ arg ) {
125125 /** @var array $convertedArg */
126126 $ convertedArg = $ arg ->getSet ()->getValue ();
127127 // array_values is needed to make sure the indexes are ordered from 0
@@ -136,14 +136,14 @@ public function intersect(Value $set): self
136136 *
137137 * Returns a Set which is the complement of this Set with all passed Sets.
138138 *
139- * @param Value $set, ...
139+ * @param Value ...$sets One or more Sets
140140 */
141- public function complement (Value $ set ): self
141+ public function complement (Value ... $ sets ): self
142142 {
143143 $ complement = $ this ->value ;
144144
145145 /** @var Value $arg */
146- foreach (\func_get_args () as $ arg ) {
146+ foreach ($ sets as $ arg ) {
147147 /** @var array $convertedArg */
148148 $ convertedArg = $ arg ->getSet ()->getValue ();
149149 // array_values is needed to make sure the indexes are ordered from 0
0 commit comments