| Total Complexity | 12 |
| Total Lines | 133 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ServerDoc |
||
| 8 | { |
||
| 9 | /** @var string|null */ |
||
| 10 | private $name; |
||
| 11 | /** @var string|null */ |
||
| 12 | private $version; |
||
| 13 | /** @var MethodDoc[] */ |
||
| 14 | private $methodList = []; |
||
| 15 | /** @var TagDoc[] */ |
||
| 16 | private $tagList = []; |
||
| 17 | /** @var ErrorDoc[] */ |
||
| 18 | private $serverErrorList = []; |
||
| 19 | /** @var ErrorDoc[] */ |
||
| 20 | private $methodErrorList = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $name |
||
| 24 | * |
||
| 25 | * @return ServerDoc |
||
| 26 | */ |
||
| 27 | public function setName(string $name) : ServerDoc |
||
| 28 | { |
||
| 29 | $this->name = $name; |
||
| 30 | |||
| 31 | return $this; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $version |
||
| 36 | * |
||
| 37 | * @return ServerDoc |
||
| 38 | */ |
||
| 39 | public function setVersion(string $version) : ServerDoc |
||
| 40 | { |
||
| 41 | $this->version = $version; |
||
| 42 | |||
| 43 | return $this; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param MethodDoc $method |
||
| 48 | * |
||
| 49 | * @return ServerDoc |
||
| 50 | */ |
||
| 51 | public function addMethod(MethodDoc $method) : ServerDoc |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param TagDoc $tag |
||
| 60 | * |
||
| 61 | * @return ServerDoc |
||
| 62 | */ |
||
| 63 | public function addTag(TagDoc $tag) : ServerDoc |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @param ErrorDoc $error |
||
| 72 | * |
||
| 73 | * @return ServerDoc |
||
| 74 | */ |
||
| 75 | public function addServerError(ErrorDoc $error) : ServerDoc |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param ErrorDoc $error |
||
| 84 | * |
||
| 85 | * @return ServerDoc |
||
| 86 | */ |
||
| 87 | public function addMethodError(ErrorDoc $error) : ServerDoc |
||
| 88 | { |
||
| 89 | $this->methodErrorList[] = $error; |
||
| 90 | |||
| 91 | return $this; |
||
| 92 | } |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @return null|string |
||
| 96 | */ |
||
| 97 | public function getName() |
||
| 98 | { |
||
| 99 | return $this->name; |
||
| 100 | } |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @return null|string |
||
| 104 | */ |
||
| 105 | public function getVersion() |
||
| 106 | { |
||
| 107 | return $this->version; |
||
| 108 | } |
||
| 109 | |||
| 110 | /** |
||
| 111 | * @return MethodDoc[] |
||
| 112 | */ |
||
| 113 | public function getMethodList() : array |
||
| 116 | } |
||
| 117 | |||
| 118 | /** |
||
| 119 | * @return TagDoc[] |
||
| 120 | */ |
||
| 121 | public function getTagList() : array |
||
| 122 | { |
||
| 123 | return $this->tagList; |
||
| 124 | } |
||
| 125 | |||
| 126 | /** |
||
| 127 | * @return ErrorDoc[] |
||
| 128 | */ |
||
| 129 | public function getServerErrorList() : array |
||
| 132 | } |
||
| 133 | |||
| 134 | /** |
||
| 135 | * @return ErrorDoc[] |
||
| 136 | */ |
||
| 137 | public function getMethodErrorList() : array |
||
| 140 | } |
||
| 141 | } |
||
| 142 |