Skip to content

Modify modules cs rules#10834

Merged
wilsonge merged 3 commits intojoomla:stagingfrom
wojsmol:modify-modules-cs-rules
Jun 29, 2016
Merged

Modify modules cs rules#10834
wilsonge merged 3 commits intojoomla:stagingfrom
wojsmol:modify-modules-cs-rules

Conversation

@wojsmol
Copy link
Copy Markdown
Contributor

@wojsmol wojsmol commented Jun 16, 2016

Pull Request for improvment .

Summary of Changes

  • modify PEAR.Functions.ValidDefaultValue exclude pattern
  • removed Generic.CodeAnalysis.UselessOverridingMethod for modules folder

Testing Instructions

Check if travis still passes

Additional comments

I modified the exclusion for PEAR.Functions.ValidDefaultValue exclude pattern due to the result of this travis build https://travis-ci.org/wojsmol/joomla-cms/jobs/137958211

cc @wilsonge @photodude

@photodude
Copy link
Copy Markdown
Contributor

photodude commented Jun 16, 2016

Looks like there was a couple of things missed between the clean up of the phpcs 1.5.x rules and the PHPCS 2.x rules. Here is what should happen based on the decisions from the phpcs2.x development.

  • Remove Generic.CodeAnalysis.UselessOverridingMethod, This sniff has too many false positives, and will need a "smarter" sniff to handle methods which are just calling the parent method with a change to the default arguments.

As for PEAR.Functions.ValidDefaultValue, that exclusion is needed. Historically we have included that sniff. Although we don't have it written out that function "Arguments with default values must be at the end of the argument list"; we do extend from the PEAR standard. I'm inclined to say that we should refactor that function or exclude the single file that's causing issues. Another option would be to implement an exclusion for PEAR.Functions.ValidDefaultValue.NotAtEnd if that is determined to be one of our deviations from the PEAR standard.

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Jun 16, 2016

@photodude Generic.CodeAnalysis.UselessOverridingMethod - should I revert commit b23cc64 ?
PEAR.Functions.ValidDefaultValue - in commit 8af941c has implemented the exclusion for a single file.

@photodude
Copy link
Copy Markdown
Contributor

I don't think that other comit needs to be reverted, just remove Generic.CodeAnalysis.UselessOverridingMethod from the ruleset with this PR as explained above. It was an oversite that it it didn't get removed before.

The other change for PEAR.Functions.ValidDefaultValue is an appropreate solution for now. Long term we will need to decide if that is the most approreate solution or choose one of the other options I suggested.

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Jun 16, 2016

@photodude done

@photodude
Copy link
Copy Markdown
Contributor

These corrections look good to me. @wilsonge

@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Jun 29, 2016

cc @wilsonge

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Jun 29, 2016

RTC based on the green mark by travis Thanks ;)


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10834.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 29, 2016
@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Jun 29, 2016

btw: what is wrong with modules/mod_articles_category/helper.php?

@wilsonge wilsonge merged commit 06d6640 into joomla:staging Jun 29, 2016
@wilsonge wilsonge added this to the Joomla 3.6.0 milestone Jun 29, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 29, 2016
@wojsmol
Copy link
Copy Markdown
Contributor Author

wojsmol commented Jun 29, 2016

@wojsmol wojsmol deleted the modify-modules-cs-rules branch June 29, 2016 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants