Skip to content

Commit

Permalink
Removed unwanted checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Aug 22, 2019
1 parent 41481aa commit e82f6ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 50 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ REMOVED:

FIXED:

## 2.0.1 - 2019-08-22

REMOVED:

- Check to forbid usage of conditions when a simple return can be used
- Check to require types to be written as natively if possible
- Check to force rules for function phpDoc

## 2.0.0 - 2019-08-22

ADDED:
Expand Down
50 changes: 0 additions & 50 deletions src/WoohooLabs/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@
<!-- Require usage of null coalesce operator when possible -->
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>

<!-- Forbid usage of conditions when a simple return can be used -->
<rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn"/>

<!-- Forbid usage of boolean-only ternary operator usage (e.g. $foo ? true : false) -->
<rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/>

Expand Down Expand Up @@ -346,16 +343,6 @@
<!-- Require one space between typehint and variable, require no space between nullability sign and typehint -->
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>

<!-- Require types to be written as natively if possible;
require iterable types to specify phpDoc with their content;
forbid useless/duplicated information in phpDoc -->
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<properties>
<property name="allAnnotationsAreUseful" value="true"/>
<property name="enableEachParameterAndReturnInspection" value="true"/>
</properties>
</rule>

<!-- Forbid useless @var for constants -->
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>

Expand All @@ -374,43 +361,6 @@
<!-- Force `self::` for self-reference, force lower-case self, forbid spaces around `::` -->
<rule ref="Squiz.Classes.SelfMemberReference"/>

<!-- Force rules for function phpDoc -->
<rule ref="Squiz.Commenting.FunctionComment">
<!-- Allow `@throws` without description -->
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows"/>
<!-- Does not work properly with PHP 7 / short-named types -->
<exclude name="Squiz.Commenting.FunctionComment.IncorrectParamVarName"/>
<!-- Does not support collections, i.e. `string[]` -->
<exclude name="Squiz.Commenting.FunctionComment.IncorrectTypeHint"/>
<!-- Forces incorrect types -->
<exclude name="Squiz.Commenting.FunctionComment.InvalidReturn"/>
<!-- Breaks with compound return types, i.e. `string|null` -->
<exclude name="Squiz.Commenting.FunctionComment.InvalidReturnNotVoid"/>
<!-- Breaks when all params are not documented -->
<exclude name="Squiz.Commenting.FunctionComment.InvalidTypeHint"/>
<!-- Doc comment is not required for every method -->
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<!-- Do not require comments for `@param` -->
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
<!-- Do not require `@param` for all parameters -->
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
<!-- Do not require `@return` for void methods -->
<exclude name="Squiz.Commenting.FunctionComment.MissingReturn"/>
<!-- Comments don't have to be sentences -->
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
<!-- Comments don't have to be sentences -->
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentNotCapital"/>
<!-- Breaks when all params are not documented -->
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch"/>
<!-- Doesn't respect inheritance -->
<exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing"/>
<!-- `@throws` lines can often be read as a sentence,
i.e. `@throws RuntimeException if the file could not be written.` -->
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNotCapital"/>
<!-- Doesn't work with self as typehint -->
<exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
</rule>

<!-- Forbid global functions -->
<rule ref="Squiz.Functions.GlobalFunction"/>

Expand Down

0 comments on commit e82f6ad

Please sign in to comment.