Skip to content

Commit

Permalink
Upgrade en re-add UnusedUses sniff (#52)
Browse files Browse the repository at this point in the history
* Upgrade mediawiki-codesniffer and slevomat/coding-standard
* Re-add UnusedUses sniff to HostnetExperimental (autofixer disabled)
* End php 7.1 support
  • Loading branch information
janlam7 authored Jan 6, 2020
1 parent e54656e commit ed77563
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 7.1
- 7.2
- 7.3
- nightly
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards. Hostnet version",
"license": "MIT",
"require": {
"php": ">=7.1",
"php": ">=7.2",
"composer-plugin-api": "^1.0.0",
"hostnet/path-composer-plugin-lib": "^1.0.2",
"mediawiki/mediawiki-codesniffer": "^26.0.0",
"slevomat/coding-standard": "^4.6.0",
"mediawiki/mediawiki-codesniffer": "^28.0.0",
"slevomat/coding-standard": "^5.0.4",
"squizlabs/php_codesniffer": "^3.4.2",
"symfony/filesystem": "^3.0.2|^4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Hostnet/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>

<!-- Forbid empty lines around type declarations -->
<rule ref="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces">
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0"/>
<property name="linesCountBeforeClosingBrace" value="0"/>
Expand Down
6 changes: 6 additions & 0 deletions src/HostnetExperimental/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
<rule ref="Hostnet"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<exclude phpcbf-only="true" name="SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse"/>
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingPropertyTypeHint"/>
Expand Down

0 comments on commit ed77563

Please sign in to comment.