Code Duplication    Length = 11-11 lines in 2 locations

src/PHPSemVerChecker/SemanticVersioning/Level.php 2 locations

@@ 34-44 (lines=11) @@
31
	 * @param int $level
32
	 * @return string
33
	 */
34
	public static function toString($level)
35
	{
36
		$mapping = [
37
			self::NONE  => 'NONE',
38
			self::PATCH => 'PATCH',
39
			self::MINOR => 'MINOR',
40
			self::MAJOR => 'MAJOR',
41
		];
42
43
		return $mapping[$level];
44
	}
45
46
	/**
47
	 * @param string $level
@@ 50-60 (lines=11) @@
47
	 * @param string $level
48
	 * @return int
49
	 */
50
	public static function fromString($level)
51
	{
52
		$mapping = [
53
			'NONE'  => self::NONE,
54
			'PATCH' => self::PATCH,
55
			'MINOR' => self::MINOR,
56
			'MAJOR' => self::MAJOR,
57
		];
58
59
		return $mapping[strtoupper($level)];
60
	}
61
}
62