Code Duplication    Length = 6-7 lines in 2 locations

src/Control/Session.php 2 locations

@@ 394-399 (lines=6) @@
391
392
            $var = $this->data;
393
394
            foreach ($names as $n) {
395
                if (!isset($var[$n])) {
396
                    return null;
397
                }
398
                $var = $var[$n];
399
            }
400
401
            return $var;
402
        }
@@ 423-429 (lines=7) @@
420
        $var = &$this->data;
421
        $diffVar = &$this->changedData;
422
423
        foreach ($names as $n) {
424
            // don't clear a record that doesn't exist
425
            if (!isset($var[$n])) {
426
                return $this;
427
            }
428
            $var = &$var[$n];
429
        }
430
431
        // only loop to find data within diffVar if var is proven to exist in the above loop
432
        foreach ($names as $n) {