Skip to content

Conversation

@tejash-wagento
Copy link
Contributor

@tejash-wagento tejash-wagento commented Jan 10, 2020

Description

Remove extra space before semicolon and remove extra comma in php, phtml and js files

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jan 10, 2020

Hi @tejash-wagento. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@magento-engcom-team magento-engcom-team added Partner: Wagento Pull Request is created by partner Wagento partners-contribution Pull Request is created by Magento Partner labels Jan 10, 2020
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-6580 has been created to process this Pull Request
✳️ @dmytro-ch, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

[10, 20, 'once'],
[null, 10, 'never'],
[10, 10, 'never'],
[10, 10, 'once', true],
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is definitely not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added comma after array

define('analyticsPopupConfig', function () {
return {
analyticsVisible: <?= $block->getNotification()->isAnalyticsVisible() ? 1 : 0; ?>,
releaseVisible: <?= $block->getNotification()->isReleaseVisible() ? 1 : 0; ?>,
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is not needed if it works with trailing comma.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @orlangur here, keeping comma's in javascript objects or php arrays is a good thing, it gives a clearer diff in git when one or multiple lines are added if a comma already existed on the line above the new line.

For javascript, historically this was an issue in older Internet Explorer versions, they couldn't handle that, but according to this comment it was fixed in IE9 and higher and Magento only supports IE11, so we should be fine.

PHP is more and more encouraging this kind of syntax btw, PHP 7.3 got a new feature where arguments in function/method calls can now also have a trailing comma: https://www.php.net/manual/en/migration73.new-features.php#migration73.new-features.core.trailing-commas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@orlangur, comma added after array,
Thanks for suggestion.

Copy link
Contributor

@dmytro-ch dmytro-ch left a comment

Choose a reason for hiding this comment

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

@tejash-wagento, could you please also check and fix the static test failures?

@tejash-wagento
Copy link
Contributor Author

@dmytro-ch, issue fixed

@engcom-Golf engcom-Golf self-assigned this Feb 7, 2020
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-6580 has been created to process this Pull Request

@engcom-Delta
Copy link
Contributor

Notice: QA not applicable

@m2-assistant
Copy link

m2-assistant bot commented Feb 13, 2020

Hi @tejash-wagento, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

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.

9 participants