| 1 | <?php |
||
| 13 | class Response extends AbstractModel implements Arrayable { |
||
| 14 | |||
| 15 | use RefPart; |
||
| 16 | use DescriptionPart; |
||
| 17 | use SchemaPart; |
||
| 18 | use ExtensionPart; |
||
| 19 | |||
| 20 | /** @var string */ |
||
| 21 | private $code; |
||
| 22 | |||
| 23 | /** @var Map */ |
||
| 24 | private $examples; |
||
| 25 | |||
| 26 | /** @var Headers */ |
||
| 27 | private $headers; |
||
| 28 | |||
| 29 | 6 | public function __construct($code, $contents = []) { |
|
| 33 | |||
| 34 | 6 | private function parse($contents = []) { |
|
| 46 | |||
| 47 | 5 | public function toArray() { |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Returns the responses code |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | 1 | public function getCode() { |
|
| 59 | |||
| 60 | /** |
||
| 61 | * |
||
| 62 | * @return Map |
||
| 63 | */ |
||
| 64 | public function getExamples() { |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Returns headers for this response |
||
| 70 | * |
||
| 71 | * @return Headers |
||
| 72 | */ |
||
| 73 | 1 | public function getHeaders() { |
|
| 76 | |||
| 77 | } |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.