[General] Fix issues identified by PHP Mess Detector

Review Request #81 — Created March 28, 2013 and submitted

pprkut
Lunr
pprkut:checkstyle
lunr
Fix a few issues uncovered by phpmd.
Raise the too many methods per class limit to 20.
Don't report unused formal parameters for the mysql connection mocks.
Unit Tests
  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
dinos
  1. Ship It!
  2. 
      
Felipe
  1. 
      
  2. Why do you suppress the warning?
    1. Because they are Mocks. They are forced to comply to the function signature but return a static value, so naturally don't use any of the parameters. So reporting warnings here just adds noise.
    2. Ahh ok, that makes sense
  3. tests/phpmd.xml (Diff revision 1)
     
     
    where does this number come from? why 20?
    1. Default value is 15 and it hit quite a lot of classes that have 15 or 16 methods. 20 was a reasonable increase to not throw warnings for those cases, and there is no class with 21 methods or so.
    2. Fair enough
  4. 
      
Felipe
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master
Loading...