Skip to content

Conversation

@Nyholm
Copy link
Member

@Nyholm Nyholm commented May 11, 2017

Q A
Bug fix? yes
New feature? no
BC breaks? yes, but they are not released yet
Deprecations? no
Related tickets fixes issues from scrutinizer
Documentation
License MIT

This is just a minor change in the return value of getCurrentStack

@Nyholm Nyholm added this to the Version 1.5.0 milestone May 11, 2017
@fbourigault
Copy link
Contributor

Since #133 is really fixed, maybe we could go back to code there was before #134?

@Nyholm
Copy link
Member Author

Nyholm commented May 11, 2017

Are we sure we do always have a stack? Can we remove all these checks if $stack === null?

@fbourigault
Copy link
Contributor

Now, the only case I see to not having the stack is a user which use by himself the ProfilePlugin decorator without the StackPlugin.

$profile = new Profile($this->pluginName, $this->formatter->formatRequest($request));

if ($stack = $this->collector->getCurrentStack()) {
if (null !== $stack = $this->collector->getCurrentStack()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this line will be easier to read if the assignation is moved out of the condition.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are correct, It is me that really like this syntax

@Nyholm
Copy link
Member Author

Nyholm commented May 11, 2017

Thank you for the review.

@Nyholm Nyholm merged commit b059ce0 into master May 11, 2017
@Nyholm Nyholm deleted the Nyholm-patch-32 branch May 11, 2017 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants