Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] Fix DataCollector template #30078

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

Merged

Conversation

ottaviano
Copy link
Contributor

Q A
Branch? 4.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets ~
License MIT
Doc PR ~

It's for adding a closing DIV tag on L96 (+ re-indent the HTML code)

Copy link

@Kronhyx Kronhyx left a comment

Choose a reason for hiding this comment

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

I have doubts

<div class="tab">
{% set messages = collector.messages %}
{% set exceptionsCount = collector.exceptionsCount %}
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3>
Copy link

Choose a reason for hiding this comment

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

Taking advantage of the fact that you are refactoring why you do not use a strict comparison?

Suggested change
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount == messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3>
<h3 class="tab-title">All<span class="badge {{ exceptionsCount ? exceptionsCount === messages|length ? 'status-error' : 'status-some-errors' }}">{{ messages|length }}</span></h3>

Copy link
Member

Choose a reason for hiding this comment

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

Twig doesn't have a === operator.

Copy link

Choose a reason for hiding this comment

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

haha ... ups ... I missed it ... hehe

Copy link
Contributor

Choose a reason for hiding this comment

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

But it has:

exceptionsCount is same as (messages|length)

No sure it worth using it here anyway.

@nicolas-grekas nicolas-grekas added this to the 4.2 milestone Feb 7, 2019
@nicolas-grekas
Copy link
Member

Thank you @ottaviano.

@nicolas-grekas nicolas-grekas merged commit 146ae74 into symfony:4.2 Feb 7, 2019
nicolas-grekas added a commit that referenced this pull request Feb 7, 2019
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Fix DataCollector template

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

It's for adding a closing DIV tag on L96 (+ re-indent the HTML code)

Commits
-------

146ae74 [Messenger] Fix DataCollector template
@fabpot fabpot mentioned this pull request Mar 3, 2019
@ottaviano ottaviano deleted the fix-messenger-data-collector-template branch March 4, 2019 22:22
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.

7 participants