Skip to content

Conversation

@seregazhuk
Copy link
Contributor

This PR provides some small code improvements. It:

  • removes unused variables
  • simplifies statements
  • removes unnecessary properties initialization

private $endPaused = false;
private $closePaused = false;
private $errorPaused = null;
private $errorPaused;
Copy link
Member

Choose a reason for hiding this comment

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

I understand that these assignments are essentially a NOOP. I've intentionally added these in the past to explicitly state that this property isn't initialized as part of the constructor (see also other occurrences). Would love to hear some more thoughts on this, but won't block this either way. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As for me, I think that the constructor itself says more explicitly about it, rather then assigned null default value. The idea behind these assignments wasn't clear for me, so I've considered them as useless. But if it is a common practice in the code, of course I will undo this change.

@clue
Copy link
Member

clue commented Jan 16, 2018

For the reference: This is also somewhat related to #295, does it make sense to cherry-pick (some of) the changes into a single PR?

@seregazhuk
Copy link
Contributor Author

Sorry, but I'm not sure, that I know how to cherry pick commit from my request to someone's else 😞

@WyriHaximus WyriHaximus added this to the v0.8.2 milestone Jan 24, 2018
@clue
Copy link
Member

clue commented Mar 17, 2018

I've just cherry picked @PabloJoan's relevant changes from #295 to this PR :shipit:

@WyriHaximus WyriHaximus merged commit 4bd4542 into reactphp:master Mar 17, 2018
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.

5 participants