php-http / client-common

Common HTTP Client implementations and tools for HTTPlug
http://httplug.io
MIT License
1.03k stars 54 forks source link

Static analysis fixes #203

Closed GrahamCampbell closed 4 years ago

GrahamCampbell commented 4 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
License MIT

PHPStan has detected 3 more bugs for us, ~and some unreachable code in the plugin client~.

  1. Fixed bug in the cookie plugin
  2. Fixed null bug in when parsing date header
  3. Fixed typo in methods client phpdoc
  4. ~Removed unreachable plugin client code~
  5. Don't temprarily violate property types in the flexible http client
  6. Added phpstan and some extra type information to help it, in some places
GrahamCampbell commented 4 years ago

It looks like that dead was code intentionally in there, even though it was not needed...

dbu commented 4 years ago

Removed unreachable plugin client code

are we missing some tests with that code?

GrahamCampbell commented 4 years ago

are we missing some tests with that code?

No, there are tests, and that's what made me put the code back.

GrahamCampbell commented 4 years ago

Maybe unreachable was the wrong word. It's more that the code was duplicated, however that seems to have been intentional.