diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-03-10 23:08:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 23:08:31 +0300 |
commit | c11469e4199405628e97650914f0cdbdea94dac7 (patch) | |
tree | af07edd44b6ac95fa3cd6e439d435cf6c55e9ad5 /phpcs.xml | |
parent | 05082abdca8909cf27137773f129cf66f495922b (diff) |
[Codingstyle] Disallow unused use statements (#18520)
* Forbid unused use statements
* Fix some incorrect classnames
* fix tests
* remove unused use statements
Diffstat (limited to 'phpcs.xml')
-rw-r--r-- | phpcs.xml | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -10,6 +10,7 @@ <file>tests/PHPUnit</file> <exclude-pattern>tests/PHPUnit/proxy/*</exclude-pattern> + <exclude-pattern>tests/javascript/*</exclude-pattern> <exclude-pattern>*/vendor/*</exclude-pattern> <exclude-pattern>*/libs/*</exclude-pattern> @@ -26,6 +27,17 @@ <!-- Forbid inline control structures --> <rule ref="Generic.ControlStructures.InlineControlStructure" /> + <!-- Forbid unused use statements --> + <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"> + <properties> + <property name="searchAnnotations" value="true"/> + <property name="ignoredAnnotations" type="array"> + <element value="@group"/> + <element value="@api"/> + </property> + </properties> + </rule> + <!-- Forbid some functions that should not be used (directly) --> <rule ref="Generic.PHP.ForbiddenFunctions"> <properties> |