ci: add Static Analysis via PHPStan
This adds static analysis of the package via PHPStan. 👍🏻
I've currently baselined the existing issues, and this should probably be worked through to reduce this so that the baseline can be removed. 👌🏻 Some of the things like the curl_* function issues at the bottom can't easily be removed as CurlHandle isn't available on PHP 7.x, so unless PHP 7 is dropped, this probably can't be addressed.
However, it has drawn attention to issues like dynamically-declared properties (which are removed in PHP 8.2).
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Just to be sure let me ask you: The baselined issues exist because Transaction, Segment, and Error are array objects to which properties are dynamically added. PHPStan doesn't recognize it and see a lot of undefined properties?
Yes, as far as I can tell, that is correct. 🤔 I guess this should be possible to resolve with generics, or by specifying the properties as docblocks. 🤷🏻 Or adding the properties so that they aren't within an array.