Code Duplication    Length = 3-3 lines in 2 locations

src/Validator.php 2 locations

@@ 70-72 (lines=3) @@
67
			}
68
69
			$diff = array_diff_key($data, $structure);
70
			if (count($diff) > 0) {
71
				throw new ValidatorException(sprintf('Unknown keys (%s) in %s', implode(', ', array_keys($diff)), self::getStructurePath($path)));
72
			}
73
74
			$diff = array_diff_key($structure, $data);
75
			if (count($diff) > 0) {
@@ 75-77 (lines=3) @@
72
			}
73
74
			$diff = array_diff_key($structure, $data);
75
			if (count($diff) > 0) {
76
				throw new ValidatorException(sprintf('Missing keys (%s) in %s', implode(', ', array_keys($diff)), self::getStructurePath($path)));
77
			}
78
79
		} elseif (count($data) > 0 && !self::isList($data)) {
80
			throw new ValidatorException(sprintf('Expected list structure in %s', self::getStructurePath($path)));