Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate better connections #152

Merged

Conversation

jeromegamez
Copy link
Contributor

@jeromegamez jeromegamez commented May 20, 2024

(see what I did there? 🤭) … and raise PHPStan Level to 5

This is a follow-up to #151, where I naively updated the connection class itself.

This PR introduces the following changes on the Connection class. It proposes…

  • renaming the startHeathbeatTimer() method to startHeartbeatTimer() (and the related call in the Client class)
  • removing the unreachable condition that I targeted in Remove unreachable condition and bring PHPStan to Level5 #151, this time in the right place
  • replacing a long one-liner with $a = null; $b = null; $c = null; ... to $a = $b = $c = null;, to make it a little bit shorter
  • adding some return types
  • using null coalescing instead of isset() checks

:octocat:

src/Connection.php Outdated Show resolved Hide resolved
src/Connection.php Show resolved Hide resolved
Copy link
Collaborator

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, great job!

@WyriHaximus WyriHaximus merged commit 3a2923f into jakubkulhan:0.6.x May 24, 2024
56 checks passed
@jeromegamez jeromegamez deleted the generate-better-connections branch May 24, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants