Code Duplication    Length = 10-10 lines in 2 locations

SwaggerGen/Swagger/Operation.php 1 location

@@ 82-91 (lines=10) @@
79
				$this->deprecated = true;
80
				return $this;
81
82
			case 'error':
83
				$code = self::wordShift($data);
84
				$reasoncode = Response::getCode($code);
85
				if ($reasoncode === null) {
86
					throw new \SwaggerGen\Exception("Invalid error code: '$code'");
87
				}
88
				$description = $data;
89
				$Error = new Error($this, $reasoncode, $description);
90
				$this->responses[$reasoncode] = $Error;
91
				return $Error;
92
93
			case 'errors':
94
				foreach (self::wordSplit($data) as $code) {

SwaggerGen/Swagger/Swagger.php 1 location

@@ 172-181 (lines=10) @@
169
				$this->parameters[$Parameter->getName()] = $Parameter;
170
				return $Parameter;
171
				
172
			case 'response':
173
				$name = self::wordShift($data);
174
				$definition = self::wordShift($data);
175
				$description = $data;
176
				if (empty($description)) {
177
					throw new \SwaggerGen\Exception('Response definition missing description');
178
				}
179
				$Response = new Response($this, $name, $definition === 'null' ? null : $definition, $description);
180
				$this->responses[$name] = $Response;
181
				return $Response;
182
183
			case 'api': // alias
184
			case 'tag':