mc-magento2
mc-magento2 copied to clipboard
#1759 Cleanup before further optimizations
Not changing any feature, just cleanup from messy PHPDoc, lint the code, and remove unused imports.
Can't accept this PR, the PR delete a lot of documentation at the start of a lot of scripts
@gonzaloebiz
The problem (and the reason for cleanup) is fact, that none of removed snippets bring any value to the table. Let's get through this with examples:
https://github.com/mailchimp/mc-magento2/blob/b19f552810132ec9a09c7f38ad446314cc46ac13/Block/Adminhtml/Customer/Edit/Tabs/Mailchimp.php#L2-L12
Does not bring any value to the table, as it describes:
- Mailchimp Magento Component - This is already defined in
composer.json
of an extension -
@category
,@package
- These elements are discouraged by Magento Coding Standard and redundant (information already included both incomposer.json
and namespace) -
@author
already included incomposer.json
-
@license
already included incomposer.json
-
@date
and@file
(really?!) not necessary at all, discouraged by Magento Coding Standard
Additionally, your "Copyright Block" is inconsistent and is not included in most of the files, so with my change I introduce consistency across the table.
Not even mentioning these accidents while committing your work:
https://github.com/mailchimp/mc-magento2/blob/b19f552810132ec9a09c7f38ad446314cc46ac13/Block/Adminhtml/System/Config/CleanEcommerce.php#L2-L7
All the occurrences of Class name in PHPDoc above the class, that does not introduce any added value, gets removed. Example:
If you really want to bring any value to the table, either provide information that is not included in a class name or... remove the PHPDoc Block.
Apart from these, the remaining elements are Code Style adjustments and removal of unused imports. If you have anything in your mind saying "delete a lot of documentation" - Please let me know what of the removed snippets you consider valuable, I'll bring these back in the PR.