| 1 | <?php |
||
| 11 | class Method |
||
| 12 | { |
||
| 13 | /** @var bool */ |
||
| 14 | private $isStatic; |
||
| 15 | /** @var string */ |
||
| 16 | private $name; |
||
| 17 | /** @var string */ |
||
| 18 | private $return; |
||
| 19 | /** @var Param[] */ |
||
| 20 | private $params; |
||
| 21 | /** @var string */ |
||
| 22 | private $description; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Method constructor. |
||
| 26 | * @param bool $isStatic |
||
| 27 | * @param string $name |
||
| 28 | */ |
||
| 29 | 4 | public function __construct(bool $isStatic, string $name) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | public function isStatic(): bool |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | 4 | public function name(): string |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $name |
||
| 53 | * @return Method |
||
| 54 | */ |
||
| 55 | 4 | private function setName(string $name) |
|
| 65 | |||
| 66 | /** |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | 2 | public function return () |
|
| 70 | { |
||
| 71 | 2 | return $this->return; |
|
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param string $return |
||
| 76 | * @return Method |
||
| 77 | */ |
||
| 78 | 4 | public function setReturn(string $return) |
|
| 84 | |||
| 85 | /** |
||
| 86 | * @return Param[] |
||
| 87 | */ |
||
| 88 | 2 | public function params() |
|
| 89 | { |
||
| 90 | 2 | return $this->params; |
|
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @param Param[] $params |
||
| 95 | * @return Method |
||
| 96 | */ |
||
| 97 | 4 | public function setParams(array $params) |
|
| 103 | |||
| 104 | /** |
||
| 105 | * @return string |
||
| 106 | */ |
||
| 107 | public function description() |
||
| 111 | |||
| 112 | /** |
||
| 113 | * @param string $description |
||
| 114 | * @return Method |
||
| 115 | */ |
||
| 116 | 4 | public function setDescription(string $description) |
|
| 122 | } |
||
| 123 |