-
Notifications
You must be signed in to change notification settings - Fork 19
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
MAG2x: Changing long array syntax to the short syntax one. #153
Conversation
]; | ||
} | ||
|
||
return [ self::CARD => $method->getAdditionalInformation(CreditCardDataObserver::TOKEN) ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably clearer to use if ... else
, or better still a single return with a conditional operator
@@ -98,7 +98,7 @@ public function reload() | |||
class MockOmiseObject implements \ArrayAccess | |||
{ | |||
// Store the attributes of the object. | |||
protected $_values = array(); | |||
protected $_values = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Protected var name starting with _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonrandy Thanks
Code-refactoring PR will be coming in soon!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guzzilar no necessary to change in pr only few places.. I propose to change all in entire plugin..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jacekstan yup, so changing entire plugin will be coming in an another pull request once tesco-lotus
feature is merged (or maybe before) (I updated array syntax & opened this pull request just to continue from a conversation at the previous PR #123)
According to Magento Extension Quality Program Coding Standard (https://github.com/magento/marketplace-eqp). All long-array-syntax are encouraged to be updated to the short syntax one.
be1a2e9
to
1087aa5
Compare
1. Objective
There are code standard provided by Magento that all extensions have to follow in order to submit the code to their Magento Marketplace.
This pull request is aiming to update one of the standard (array syntax) to a proper one that Magento requires.
2. Description of change
3. Quality assurance
vendor/bin/phpcs /path/to/your/extension --standard=MEQP2
.Short array syntax must be used to define arrays
.Before change, we should see these ones

After change, we should see none of them

4. Impact of the change
Nothing in a user perspective, but it will make our extension be able to pass the Magento Code Quality Standard and able to submit to the Magento Marketplace.
5. Priority of change
Normal
6. Additional Notes