Skip to content

Commit

Permalink
Merge pull request #3 from newsuk/feat/CPNT-2249-php-compatibility-wp
Browse files Browse the repository at this point in the history
feat(CPNT-2249):  Add Strict type rule
  • Loading branch information
mohanrajpac authored Jan 16, 2024
2 parents 121d4f2 + f70d655 commit 71ea2a8
Show file tree
Hide file tree
Showing 3 changed files with 420 additions and 11 deletions.
3 changes: 2 additions & 1 deletion NewsUK/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
<exclude name="PSR2.Namespaces.UseDeclaration.MultipleDeclarations" />
</rule>
<rule ref="PSR2R.Namespaces.UnusedUseStatement" />
<rule ref="PSR2R.Namespaces.UseInAlphabeticalOrder" />

<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>

<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
},
"require": {
"automattic/vipwpcs": "^3.0",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0"
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"fig-r/psr2r-sniffer": "^2.0",
"slevomat/coding-standard": "^8.14"
}
}
Loading

0 comments on commit 71ea2a8

Please sign in to comment.