-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Description
Currently the HeaderBag::get()
method can return a string or array depending on the flag passed in the last argument. This causes static analysis issues as it can't be accurately determined what data type can be returned. I suggest this could be replaced with separate methods which declare/document the return type.
Example
Method to return the first as a string: public function getFirst($key, $default = null): string
Method to return the array public function getAll($key, $default = null): array