Skip to content

Commit babbaf1

Browse files
committed
ITKDev: Added code style
1 parent 90c5090 commit babbaf1

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

phpcs.xml.dist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ruleset name="PHP_CodeSniffer">
3+
<description>OS2web Audit PHP Code Sniffer configuration</description>
4+
5+
<file>.</file>
6+
<exclude-pattern>vendor/</exclude-pattern>
7+
<exclude-pattern>node_modules/</exclude-pattern>
8+
9+
<!-- Show progress of the run -->
10+
<arg value="p"/>
11+
12+
<arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,yml"/>
13+
<config name="drupal_core_version" value="9"/>
14+
15+
16+
<rule ref="Drupal">
17+
<!-- We want to be able to use "package" and "version" in our custom modules -->
18+
<exclude name="Drupal.InfoFiles.AutoAddedKeys.Project"/>
19+
<exclude name="Drupal.InfoFiles.AutoAddedKeys.Version"/>
20+
</rule>
21+
22+
<rule ref="DrupalPractice"/>
23+
</ruleset>

phpstan.neon

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
parameters:
2+
level: 6
3+
paths:
4+
- ./
5+
excludePaths:
6+
# @see https://github.com/mglaman/drupal-check/issues/261#issuecomment-1030141772/
7+
- vendor
8+
- '*/node_modules/*'
9+
ignoreErrors:
10+
# This is how drupal works....
11+
- '#Unsafe usage of new static\(\).#'
12+
- '#getEditableConfigNames\(\) return type has no value type specified in iterable type array#'
13+
- '#buildForm\(\) has parameter \$form with no value type specified in iterable type array.#'
14+
- '#buildForm\(\) return type has no value type specified in iterable type array.#'
15+
- '#validateForm\(\) has parameter \$form with no value type specified in iterable type array.#'
16+
- '#submitForm\(\) has parameter \$form with no value type specified in iterable type array.#'
17+
- '#getDerivativeDefinitions\(\) has parameter \$base_plugin_definition with no value type specified in iterable type array.#'
18+
- '#getDerivativeDefinitions\(\) return type has no value type specified in iterable type array.#'
19+
- '#LoggerManager::__construct\(\) has parameter \$namespaces with no value type specified in iterable type Traversable.#'
20+
- '#__construct\(\) has parameter \$configuration with no value type specified in iterable type array.#'
21+
- '#getConfiguration\(\) return type has no value type specified in iterable type array.#'
22+
- '#setConfiguration\(\) has parameter \$configuration with no value type specified in iterable type array.#'
23+
- '#defaultConfiguration\(\) return type has no value type specified in iterable type array.#'
24+
- '#buildConfigurationForm\(\) has parameter \$form with no value type specified in iterable type array.#'
25+
- '#buildConfigurationForm\(\) return type has no value type specified in iterable type array.#'
26+
- '#validateConfigurationForm\(\) has parameter \$form with no value type specified in iterable type array.#'
27+
- '#submitConfigurationForm\(\) has parameter \$form with no value type specified in iterable type array.#'
28+
- '#getForm\(\) invoked with 2 parameters, 1 required.#'

0 commit comments

Comments
 (0)