Skip to content

Commit

Permalink
ITKDev: Added code style
Browse files Browse the repository at this point in the history
  • Loading branch information
cableman committed May 7, 2024
1 parent a0fc417 commit 91eec32
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
23 changes: 23 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="PHP_CodeSniffer">
<description>OS2web Audit PHP Code Sniffer configuration</description>

<file>.</file>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>

<!-- Show progress of the run -->
<arg value="p"/>

<arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,yml"/>
<config name="drupal_core_version" value="9"/>


<rule ref="Drupal">
<!-- We want to be able to use "package" and "version" in our custom modules -->
<exclude name="Drupal.InfoFiles.AutoAddedKeys.Project"/>
<exclude name="Drupal.InfoFiles.AutoAddedKeys.Version"/>
</rule>

<rule ref="DrupalPractice"/>
</ruleset>
28 changes: 28 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
parameters:
level: 6
paths:
- ./
excludePaths:
# @see https://github.com/mglaman/drupal-check/issues/261#issuecomment-1030141772/
- vendor
- '*/node_modules/*'
ignoreErrors:
# This is how drupal works....
- '#Unsafe usage of new static\(\).#'
- '#getEditableConfigNames\(\) return type has no value type specified in iterable type array#'
- '#buildForm\(\) has parameter \$form with no value type specified in iterable type array.#'
- '#buildForm\(\) return type has no value type specified in iterable type array.#'
- '#validateForm\(\) has parameter \$form with no value type specified in iterable type array.#'
- '#submitForm\(\) has parameter \$form with no value type specified in iterable type array.#'
- '#getDerivativeDefinitions\(\) has parameter \$base_plugin_definition with no value type specified in iterable type array.#'
- '#getDerivativeDefinitions\(\) return type has no value type specified in iterable type array.#'
- '#LoggerManager::__construct\(\) has parameter \$namespaces with no value type specified in iterable type Traversable.#'
- '#__construct\(\) has parameter \$configuration with no value type specified in iterable type array.#'
- '#getConfiguration\(\) return type has no value type specified in iterable type array.#'
- '#setConfiguration\(\) has parameter \$configuration with no value type specified in iterable type array.#'
- '#defaultConfiguration\(\) return type has no value type specified in iterable type array.#'
- '#buildConfigurationForm\(\) has parameter \$form with no value type specified in iterable type array.#'
- '#buildConfigurationForm\(\) return type has no value type specified in iterable type array.#'
- '#validateConfigurationForm\(\) has parameter \$form with no value type specified in iterable type array.#'
- '#submitConfigurationForm\(\) has parameter \$form with no value type specified in iterable type array.#'
- '#getForm\(\) invoked with 2 parameters, 1 required.#'

0 comments on commit 91eec32

Please sign in to comment.