Support global functions in getSymbolInformation and getSymbolLocation (#3477)
Support global functions in getSymbolInformation and getSymbolLocation (#3477)

* Support global functions in getSymbolInformation and getSymbolLocation

Currently codebase-wide defined function are not found in `Codebase::getSymbolLocation` or `Codebase::getSymbolInformation`. This means hovers via the LSP on functions not in the current file, or "go to definition" do not work for non-locally defined functions.

It looks to me that this might have been an oversight, as methods do support this.

For stubbed functions, "go to definition" will open the stub file, which is also quite hadny.

* No need to catch expections, they are already in a try block.

* Add empty checks returning null

Co-authored-by: Matthew Brown <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@muglug.com>
vimeo/psalm,vimeo/psalm