Skip to content

Commit

Permalink
Fix #61: Exclude .module files from type hint requirements (#66)
Browse files Browse the repository at this point in the history
* Fix #61: Exclude .module files from type hint requirements

* docroot name, add install files
  • Loading branch information
danepowell authored Apr 11, 2024
1 parent 937fa1b commit c24be34
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Standards/AcquiaDrupalStrict/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,19 @@
<!-- Acquia PHP sniffs -->
<rule ref="AcquiaPHP"/>

<!-- Drupal should type hint hooks -->
<!-- @see https://www.drupal.org/project/drupal/issues/3229216 -->
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingAnyTypeHint">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>

</ruleset>
15 changes: 15 additions & 0 deletions src/Standards/AcquiaDrupalTransitional/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,19 @@
<!-- Acquia PHP sniffs -->
<rule ref="AcquiaPHP"/>

<!-- Drupal should type hint hooks -->
<!-- @see https://www.drupal.org/project/drupal/issues/3229216 -->
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingAnyTypeHint">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>*/modules/custom/*/*\.(module|install)$</exclude-pattern>
</rule>

</ruleset>

0 comments on commit c24be34

Please sign in to comment.