php-coupling-detector
php-coupling-detector copied to clipboard
[Experimental] Detect all the coupling issues of your project with respect to the coupling rules you have defined.
Especially on domain objects (Rule, Node, etc.).
For example when [displaying violations of a discouraged rule](https://github.com/akeneo/php-coupling-detector/blob/master/src/Formatter/Console/PrettyFormatter.php#L81), the `` tag is not interpreted to style the output and is displayed as is. 
Imagine a namespace `Acme\Domain`. I'd like to have something that tells I can use only `Acme\Domain` in `Acme\Domain`.
for example: - an empty php file - a procedural php script - a class without namespace ``` In NamespaceExtractor.php line 35: No way to parse the namespace of this...
How to do it manually (to understand): - http://php.net/manual/fr/book.phar.php - http://www.sitepoint.com/packaging-your-apps-with-phar/ How to do it automatically: - https://github.com/clue/phar-composer
When there was an issue on ClassNameExtractor or NamespaceExtractor, the Exception does not link to any file. This PR improve the exception message to include the errored file.
in strict mode, discouraged rules are counted and displayed as violations in "cool" mode, they are not