@@ 292-298 (lines=7) @@ | ||
289 | foreach ($this->keys as $index => $key) { |
|
290 | $newKey = $discriminator($key, $this->values->get($index)); |
|
291 | ||
292 | if ($map === null) { |
|
293 | $type = gettype($newKey); |
|
294 | $map = new self( |
|
295 | $type === 'object' ? get_class($newKey) : $type, |
|
296 | SequenceInterface::class |
|
297 | ); |
|
298 | } |
|
299 | ||
300 | $pair = $this->pairs->get($index); |
|
301 |
@@ 224-230 (lines=7) @@ | ||
221 | foreach ($this->values as $value) { |
|
222 | $key = $discriminator($value); |
|
223 | ||
224 | if ($map === null) { |
|
225 | $type = gettype($key); |
|
226 | $map = new Map( |
|
227 | $type === 'object' ? get_class($key) : $type, |
|
228 | SequenceInterface::class |
|
229 | ); |
|
230 | } |
|
231 | ||
232 | if ($map->contains($key)) { |
|
233 | $map = $map->put( |