Code Duplication    Length = 11-11 lines in 2 locations

src/PHPSemVerChecker/SemanticVersioning/Level.php 2 locations

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