phpmd / phpmd/phpmd

New Ruleset: Object Calisthenics/Solid rules

Open
#68 2 comments 0 reactions 1 assignee View on GitHub

@manuelpichler is already working on this.

Since Feb 23, 2013.

Enhancement Feature New Rule
Dominant language
PHP
Stars
2.5k
Forks
361
Avg merge
1d 19h
Merged PRs (30d)
11

Description

  • Check for Law Of Demeter violations (how to detect fluent interfaces?)
  • Check for more then one nested scope per method
  • Usage of else keyword is discouraged
  • Usage of boolean flags in method arguments hints at SRP violation.
  • Retrieving dependencies through static access (singletons, ...) violates Dependency Inversion Principle
  • Multiple instanceof statements in a method/scope hint at violation of open-closed principle
  • Interface with more than N methods violates Interface segregation principle
  • new Statement in constructor

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.