Code Duplication    Length = 11-11 lines in 2 locations

src/Extra/RuleValidator.php 2 locations

@@ 32-42 (lines=11) @@
29
		return $this->dice->create($name, $args, $share);
30
	}
31
32
	public function checkAssocArray($rule, $key)
33
	{
34
		if (!isset($rule[$key])) {
35
			return;
36
		}
37
38
		if (count(array_filter(array_keys($rule[$key]), 'is_string')) === 0) {
39
			throw new \InvalidArgumentException('Rule option ' . $key . ' must be a an associative array');
40
		}
41
42
	}
43
44
	public function checkBoolean($rule, $key)
45
	{
@@ 55-65 (lines=11) @@
52
		}
53
	}
54
55
	public function checkNumericArray($rule, $key)
56
	{
57
		if (!isset($rule[$key])) {
58
			return;
59
		}
60
61
		if (count(array_filter(array_keys($rule[$key]), 'is_string')) > 0) {
62
			throw new \InvalidArgumentException('Rule option ' . $key
63
				. ' must be a sequential array, not an associative array');
64
		}
65
	}
66
67
	private function checkValidKeys($rule)
68
	{