|
@@ 21-26 (lines=6) @@
|
| 18 |
|
public function match($body) |
| 19 |
|
{ |
| 20 |
|
if ($this->swaggerSchema->getSpecificationVersion() === '3') { |
| 21 |
|
if (!isset($this->structure['content'])) { |
| 22 |
|
if (!empty($body)) { |
| 23 |
|
throw new NotMatchedException("Expected empty body for " . $this->name); |
| 24 |
|
} |
| 25 |
|
return true; |
| 26 |
|
} |
| 27 |
|
return $this->matchSchema($this->name, $this->structure['content'][key($this->structure['content'])]['schema'], $body); |
| 28 |
|
} |
| 29 |
|
|
|
@@ 30-35 (lines=6) @@
|
| 27 |
|
return $this->matchSchema($this->name, $this->structure['content'][key($this->structure['content'])]['schema'], $body); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
if (!isset($this->structure['schema'])) { |
| 31 |
|
if (!empty($body)) { |
| 32 |
|
throw new NotMatchedException("Expected empty body for " . $this->name); |
| 33 |
|
} |
| 34 |
|
return true; |
| 35 |
|
} |
| 36 |
|
return $this->matchSchema($this->name, $this->structure['schema'], $body); |
| 37 |
|
} |
| 38 |
|
} |