Menu

#44 New Rule : Count the number of inheritance levels

Accepted
nobody
None
Medium
Enhancement
2014-08-29
2013-01-18
Anonymous
No

Originally created by: tch...@hotmail.com
Originally owned by: tch...@hotmail.com

Cf http://blog.ircmaxell.com/2011/07/are-traits-new-eval.html

By keeping inheritance depth to a reasonably small number (I usually choose 3 as a soft warning, and 6 as an error), it makes understanding the class easier

Discussion

  • Anonymous

    Anonymous - 2014-03-04

    Originally posted by: tch...@hotmail.com

    Split in "PHPCheckstyle.php" the global variables that are linked to a file and the ones that are valid of a complete project.

    Build a map of files in the project and the dependencies between files (classes / traits). Hope there is only 1 class per file.

    Add some checks at a global level (number of inheritance, max include number, coupling, ...).

     
  • Anonymous

    Anonymous - 2014-08-29

    Originally posted by: ukjbrooks

    Now that PHPCheckstyle is PSR-0 compliant, this will be much easier to do with namespacing. I feel that the constant values should be put into their own file and classmapped as a file autoload.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.