Skip to the content.

List unused requirements

The list-unused-requirements command is a complementary tool to the detect command that allows you to easily clean your configuration. It lists the requirements that are not necessary anymore for each rule :

    php bin/php-coupling-detector list-unused-requirements

Like the detect command, you can specify the path to the configuration file with the --config-file option.

The exit status of the list-unused-requirements command can be: 10 if some unused requirements have been found, or 0 otherwise.

Please note that for the moment this is relevant only for rules of type ONLY as the notion of “unused requirement” in a DISCOURAGED or FORBIDDEN rule makes no sense.