Code Duplication    Length = 13-14 lines in 3 locations

SwaggerGen/Swagger/Type/ArrayType.php 1 location

@@ 58-70 (lines=13) @@
55
	private $maxItems = null;
56
	private $collectionFormat = null;
57
58
	protected function parseDefinition($definition)
59
	{
60
		$definition = self::trim($definition);
61
62
		$match = array();
63
		if (preg_match(self::REGEX_START . self::REGEX_FORMAT . self::REGEX_CONTENT . self::REGEX_RANGE . self::REGEX_END, $definition, $match) !== 1) {
64
			throw new \SwaggerGen\Exception("Unparseable array definition: '{$definition}'");
65
		}
66
		
67
		$this->parseFormat($definition, $match);
68
		$this->parseItems($definition, $match);
69
		$this->parseRange($definition, $match);
70
	}
71
72
	private function parseFormat($definition, $match)
73
	{

SwaggerGen/Swagger/Type/ObjectType.php 1 location

@@ 32-44 (lines=13) @@
29
	 */
30
	private $properties = array();
31
32
	protected function parseDefinition($definition)
33
	{
34
		$definition = self::trim($definition);
35
		
36
		$match = array();
37
		if (preg_match(self::REGEX_START . self::REGEX_FORMAT . self::REGEX_CONTENT . self::REGEX_RANGE . self::REGEX_END, $definition, $match) !== 1) {
38
			throw new \SwaggerGen\Exception("Unparseable object definition: '{$definition}'");
39
		}
40
41
		$this->parseFormat($definition, $match);
42
		$this->parseProperties($definition, $match);
43
		$this->parseRange($definition, $match);
44
	}
45
46
	private function parseFormat($definition, $match)
47
	{

SwaggerGen/Swagger/Type/StringType.php 1 location

@@ 30-43 (lines=14) @@
27
	private $minLength = null;
28
	private $enum = array();
29
30
	protected function parseDefinition($definition)
31
	{
32
		$definition = self::trim($definition);
33
34
		$match = array();
35
		if (preg_match(self::REGEX_START . self::REGEX_FORMAT . self::REGEX_CONTENT . self::REGEX_RANGE . self::REGEX_DEFAULT . self::REGEX_END, $definition, $match) !== 1) {
36
			throw new \SwaggerGen\Exception("Unparseable string definition: '{$definition}'");
37
		}
38
39
		$this->parseFormat($definition, $match);
40
		$this->parseContent($definition, $match);
41
		$this->parseRange($definition, $match);
42
		$this->parseDefault($definition, $match);
43
	}
44
45
	private function parseFormat($definition, $match)
46
	{