Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | protected function parseParamDescription(string $description, string $type) |
||
34 | { |
||
35 | $example = null; |
||
36 | if (preg_match('/(.*)\s+Example:\s*(.*)\s*/', $description, $content)) { |
||
37 | $description = $content[1]; |
||
38 | |||
39 | // examples are parsed as strings by default, we need to cast them properly |
||
40 | $example = $this->castToType($content[2], $type); |
||
41 | } |
||
42 | |||
43 | return [$description, $example]; |
||
44 | } |
||
45 | } |
||
46 |