@@ -25,7 +25,6 @@ |
||
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Get the description of a method from the doc block |
28 | - * @param ReflectionMethod $method |
|
29 | 28 | * @return string|null |
30 | 29 | */ |
31 | 30 | public function getMethodDescription(): ?string |
@@ -66,7 +66,7 @@ |
||
66 | 66 | * Return the getter/isser method if any valid one exists |
67 | 67 | * @param mixed $source |
68 | 68 | * @param string $name |
69 | - * @return string |
|
69 | + * @return ReflectionMethod|null |
|
70 | 70 | */ |
71 | 71 | private function getGetter($source, string $name): ?ReflectionMethod |
72 | 72 | { |
@@ -72,8 +72,9 @@ |
||
72 | 72 | { |
73 | 73 | $class = new ReflectionClass($source); |
74 | 74 | |
75 | - if (!preg_match('~^(is|has)[A-Z]~', $name) || !$class->hasMethod($name)) |
|
76 | - $name = 'get' . ucfirst($name); |
|
75 | + if (!preg_match('~^(is|has)[A-Z]~', $name) || !$class->hasMethod($name)) { |
|
76 | + $name = 'get' . ucfirst($name); |
|
77 | + } |
|
77 | 78 | |
78 | 79 | if ($class->hasMethod($name)) { |
79 | 80 | $method = $class->getMethod($name); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * Serializes an internal value to include in a response. |
40 | 40 | * |
41 | 41 | * @param mixed $value |
42 | - * @return mixed |
|
42 | + * @return string |
|
43 | 43 | */ |
44 | 44 | public function serialize($value) |
45 | 45 | { |