mc-magento2 icon indicating copy to clipboard operation
mc-magento2 copied to clipboard

#1759 Cleanup before further optimizations

Open lbajsarowicz opened this issue 1 year ago • 2 comments

Not changing any feature, just cleanup from messy PHPDoc, lint the code, and remove unused imports.

lbajsarowicz avatar Aug 04 '23 11:08 lbajsarowicz

Can't accept this PR, the PR delete a lot of documentation at the start of a lot of scripts

gonzaloebiz avatar Aug 09 '23 19:08 gonzaloebiz

@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 in composer.json and namespace)
  • @author already included in composer.json
  • @license already included in composer.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:

image

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.

lbajsarowicz avatar Aug 10 '23 06:08 lbajsarowicz