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

Kom igång med phpmetrics och analysera din kod #38

Open
mosbth opened this issue May 10, 2021 · 0 comments
Open

Kom igång med phpmetrics och analysera din kod #38

mosbth opened this issue May 10, 2021 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@mosbth
Copy link
Member

mosbth commented May 10, 2021

Någon nämnde att Cohesion och Coupling inte syntes på Scrutinizer för vissa repon.

Det finns ett verktyg phpmetrics som kan generera dessa data och visa upp dem lokalt. Gör följande för att se ett exempel baserat på din egen kod.

composer require 'phpmetrics/phpmetrics' --dev
vendor/bin/phpmetrics --report-html=myreport.html src

Öppna din webbläsare mot filen myreport.html. Kika i rapporten så ser du dina värden för Coupling och Cohesion.

Jag uppdaterade exemplet i example/game/router och lade till stöd för phpmetrics i Makefilen. Det berörde filen composer.json samt konfigurationsfilen .phpmetrics.json. Du kan se vad som ändrades i committen ad22185.

@mosbth mosbth self-assigned this May 10, 2021
mosbth added a commit that referenced this issue May 10, 2021
@mosbth mosbth added documentation Improvements or additions to documentation enhancement New feature or request labels May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant