Code Duplication    Length = 6-7 lines in 2 locations

src/Control/Session.php 2 locations

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