{"repo":"NielsdeBlaauw/php-doc-check","free":true,"listed":false,"github":"https://github.com/NielsdeBlaauw/php-doc-check","clone":"git clone https://github.com/NielsdeBlaauw/php-doc-check.git","description":"Uses complexity metrics to determine which functions need documentation.","language":"PHP","stars":43,"topics":["php","ci","automated-testing","docblock","cyclomatic-complexity","hacktoberfest","score","metrics","docblocks"],"license":"MIT","category":"analytics","readme_excerpt":"php-doc-check PHP Doc Check is an automated command line tool to determine which functions and methods could use some more documentation. By default this script: - Emits a warning if there is no docblock for non trivial functions (score 4) - Emits an error if there is no docblock for complex functions (score 6) You can gradually improve documenation on projects by starting with relatively high limits and slowly moving these limits down. Metrics - Cognitive Complexity is used to find functions that are complex to read and understand. - Cyclomatic Complexity is used to find complex functions with a more traditionl algorithm. Installation Composer For now you have to install the beta version. composer require --dev niels-de-blaauw/php-doc-check:^0.2.0@dev Phive phive install php-doc-check Usage Example first use: vendor/bin/php-doc-check --exclude vendor ./ Examples This is fine without docblocks (trivial method) This could use some explanation FAQ Q: Why dont you want if there is no comment at all, regardless of complexity? A: You can set this software to warn for all functions that are undocumented by setting --complexity-error-threshold 1 . However, if you want to force documentation, you probably want to look into a tool like php CodeSniffer in combination with documentation standards. Q: Why isn't there a warning/error about complex functions and refactoring, regardless if they have a DocBlock? A: You should refactor very complex functions. However, adding DocBlocks for com","default_branch":null,"files":null,"tree":[],"storefront":"/r/NielsdeBlaauw","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/NielsdeBlaauw/php-doc-check/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}