-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Search: Add PHPCS config in search dir
Bug: T384213 Change-Id: Ie86befc491f7f2020bff85d9979c82aeffd6c56c
- Loading branch information
dima koushha
committed
Jan 30, 2025
1 parent
dd8ffac
commit 00cb74a
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="search"> | ||
<!-- This is not a standalone ruleset, but an extension of Wikibase's main phpcs config. | ||
It is invoked separately to prevent the two rule sets from interfering with each other. --> | ||
|
||
<rule ref="Generic.PHP.RequireStrictTypes" /> | ||
<rule ref="Generic.WhiteSpace.ScopeIndent" /> | ||
<rule ref="Generic.Arrays.ArrayIndent" /> | ||
<rule ref="PEAR.Functions.FunctionCallSignature.Indent" /> | ||
<rule ref="Squiz.Strings.DoubleQuoteUsage"> | ||
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" /> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification" /> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation" /> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" /> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation" /> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" /> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint" /> | ||
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"> | ||
<properties> | ||
<property name="rootNamespaces" type="array"> | ||
<element key="repo/domains/search/src" value="Wikibase\Repo\Domains\Search"/> | ||
<element key="repo/domains/search/tests/phpunit" value="Wikibase\Repo\Tests\Domains\Search"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration"> | ||
<properties> | ||
<property name="spacesCountAfterKeyword" value="0"/> | ||
</properties> | ||
</rule> | ||
|
||
<arg name="tab-width" value="4" /> | ||
<arg name="extensions" value="php" /> | ||
<exclude-pattern>node_modules/*</exclude-pattern> | ||
</ruleset> |
2 changes: 1 addition & 1 deletion
2
...mains/search/tests/phpunit/Application/UseCases/SimpleItemSearch/SimpleItemSearchTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters