FreeDSx / SNMP

A Pure PHP SNMP Library.
MIT License
57 stars 13 forks source link

Phpstan #7

Closed simPod closed 5 years ago

simPod commented 5 years ago

I started with introducing PHPStan as discussed here https://github.com/FreeDSx/SNMP/issues/6

Check it out and let me know if something looks weird

ChadSikorra commented 5 years ago

Leaving out the string type hint in many spots was actually intentional. I noticed that in some cases PHP slightly manipulated the binary string when being passed to a method where a string type hint was specified. I'm not sure what exactly triggers it though, or why that would happen. Though it doesn't seem to cause issues with any of the specs. Hmm.

simPod commented 5 years ago

If that happens we would need a test for that. But that IMO should not happen. Adding types should not modify code's behaviour. If you can reproduce it, would be cool.

ChadSikorra commented 5 years ago

Apologies for the delay on this, been busy lately. Just had a few things to add for modification on this. I really appreciate your help on this though.

simPod commented 5 years ago

I started working on lvl 2 now

simPod commented 5 years ago

@ChadSikorra I'll open lvl 2 in following PR

simPod commented 5 years ago

When all is fine with you, I'll rebase so there's no mess in commits.

ChadSikorra commented 5 years ago

All looks fine to me if you want to rebase.

simPod commented 5 years ago

@ChadSikorra did that yesterday, should be k now

ChadSikorra commented 5 years ago

Thanks again for all the work on this!