To perform this task you just have two:
WordPress within: https://github.com/nunomaduro/phpinsights/tree/master/src/Application/AdaptersCould we name the folder WordPress?
Sure, done! Do you work with WordPress buddy?
Yes, I run Laravel and WordPress sites.
Nice! Fell free to work in this issue. Should be easy. You can check the example within the Symfony repository.
Free falling is my favorite.
I'm trying to build the Preset for it. I'm getting few errors not quite sure why, perhaps you could provide some help with these
PHP Fatal error: Uncaught TypeError: Argument 2 passed to SlevomatCodingStandard\Helpers\FunctionHelper::getParametersTypeHints() must be of the type integer, null given, called in /Volumes/Projects/www/xxxxx.com.dev.synot.io/site/vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DisallowArrayTypeHintSyntaxSniff.php on line 150 and defined in /Volumes/Projects/www/xxx.com.dev.synot.io/site/vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/FunctionHelper.php:143
Yeah, I can confirm that running this as is in a WordPress project will fail on the PHPCS sniffs
PHP Fatal error: Cannot declare class PHPCompatibility\Sniffs\FunctionUse\RequiredToOptionalFunctionParametersSniff, because the name is already in use in my-project/vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniffs/FunctionUse/RequiredToOptionalFunctionParametersSniff.php on line 0
Fatal error: Cannot declare class PHPCompatibility\Sniffs\FunctionUse\RequiredToOptionalFunctionParametersSniff, because the name is already in use in my-project/vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniffs/FunctionUse/RequiredToOptionalFunctionParametersSniff.php on line 0
Not sure if vendor folder should be included or not when running the checks, also not sure if this can be applied to WordPress, because it's not a framework that you can install using composer (officially).
If an adapter would be created, it could work only with johnpbloch/wordpress or roots/wordpress used in Bedrock.
@dingo-d The vendor folder should be excluded, however we should already have code that does this.
We don't scan the vendor folder, as that is not code you have written.
Not a wordpress user myself, could somebody look into the PR?
Yup, noticed that there is a default exclusion list. I'll try to debug why the scan fails on non-bedrock projects.
Most helpful comment
Free falling is my favorite.