Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package metrics #283

Merged
merged 7 commits into from
May 8, 2018
Merged

Conversation

UFOMelkor
Copy link
Member

@UFOMelkor UFOMelkor commented Apr 19, 2017

This PR adds package metrics to PhpMetrics.

Packages are recognized by @package/@subpackage annotations in the DocBlock of a class / interface / … or by the namespace (if not annotations are found).

Current status is

  • Add package metrics
    • Number of classes
    • Abstraction / Instability / Distance
    • Incoming and outgoing class dependencies
    • Incoming and outgoing package dependencies
  • Add package violations:
    • Stable Dependencies Principle
    • Stable Abstractions Principle
  • Reporter
    • Html
      • Package metrics
      • AbstractiontInstability diagram
      • Package relations
      • Package violations
    • Cli
    • Violations
  • Add tests
  • Handle traits

Any feedback would be appreciated 😊

Some images from a PhpMetrics analysis:
image
image
image

@tPl0ch
Copy link

tPl0ch commented May 18, 2017

@UFOMelkor What is the status of this PR? We are really interested in your work here, so if I can somehow help you with finishing the implementation ping me.

@UFOMelkor
Copy link
Member Author

@tPl0ch Thank you for reminding me of this PR.

There are two questions that need be answered:

  • Do violations about the Stable Abstractions Principle make any sense (and if they do, which distance should be used as limit)?
  • How are traits handled related to packages? I tend to handle them like concrete classes.

Apart from this I hope everything is stable now. You could run an analysis of this branch against your code to check whether errors are thrown or not.

@Halleck45
Copy link
Collaborator

@UFOMelkor hard work done 👍

Can you rebase your PR please ? How can we help you to finish ?

@UFOMelkor
Copy link
Member Author

Perhaps you have some thoughts about this two questions …

  • Do violations about the Stable Abstractions Principle make any sense (and if they do, which distance should be used as limit)?
  • How are traits handled related to packages? I tend to handle them like concrete classes.

@niconoe-
Copy link
Contributor

niconoe- commented Oct 26, 2017 via email

@carusogabriel
Copy link
Contributor

If #329 goes merge, please use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase.

@UFOMelkor UFOMelkor changed the title [WIP] Package metrics Package metrics Dec 11, 2017
@Mte90
Copy link
Contributor

Mte90 commented May 2, 2018

any updates for this one?

@UFOMelkor UFOMelkor merged commit cdf0e45 into phpmetrics:master May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants