1 | <?php |
||
14 | class URLType extends StringType |
||
15 | { |
||
16 | /** |
||
17 | * Determine if URL CAN be external |
||
18 | * |
||
19 | * @var bool |
||
20 | */ |
||
21 | protected $external = false; |
||
22 | |||
23 | /** |
||
24 | * @return mixed|string|null |
||
25 | */ |
||
26 | 16 | public function getValue() |
|
50 | |||
51 | /** |
||
52 | * @return bool |
||
53 | */ |
||
54 | 16 | public function isExternal(): bool |
|
58 | } |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.