jakubkulhan / bunny

Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library
MIT License
698 stars 101 forks source link

Remove unreachable condition and bring PHPStan to Level5 #151

Closed jeromegamez closed 3 months ago

jeromegamez commented 3 months ago

I removed the elseif branch because it made the same check and was never reached. I'm not familiar enough with what's happening to know if the second branch was meant to check for something else, though 😅

:octocat:

WyriHaximus commented 3 months ago

Uhm, intend is good. Except that file is generated: https://github.com/jakubkulhan/bunny/blob/32c747c57af41b2f6261643b3f29000414630c05/src/Connection.php#L27 using https://github.com/jakubkulhan/bunny/blob/0.6.x/spec/generate.php

jeromegamez commented 3 months ago

Shoot, I didn't look into the header! I thought only the Protocol namespace was generated.

Sorry for the waste of time!

WyriHaximus commented 3 months ago

No worries, loving the work and the energy you put into these PR's 👍 . if you still want to fix it, try and fix it from the generation script. Going to be a lot harder tho 😅