1 | <?php |
||
22 | class Attachment |
||
23 | { |
||
24 | public $identifier; |
||
25 | |||
26 | public $statement; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | public $usageType; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | public $contentType; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | public $length; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | public $sha2; |
||
47 | |||
48 | /** |
||
49 | * @var array |
||
50 | */ |
||
51 | public $display; |
||
52 | |||
53 | /** |
||
54 | * @var bool |
||
55 | */ |
||
56 | public $hasDescription; |
||
57 | |||
58 | /** |
||
59 | * @var array|null |
||
60 | */ |
||
61 | public $description; |
||
62 | |||
63 | /** |
||
64 | * @var string|null |
||
65 | */ |
||
66 | public $fileUrl; |
||
67 | |||
68 | /** |
||
69 | * @var string|null |
||
70 | */ |
||
71 | public $content; |
||
72 | |||
73 | public static function fromModel(AttachmentModel $model) |
||
107 | |||
108 | public function getModel() |
||
123 | } |
||
124 |
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.