Skip to content
Snippets Groups Projects
Commit fa115403 authored by Anastaszor's avatar Anastaszor
Browse files

Harmonization 2024-12-01 Update @SuppressWarnings phpstan-phpmd conflict

parent c192cd9a
Branches
Tags 7.0.6
No related merge requests found
Pipeline #1568119061 passed
......@@ -489,6 +489,14 @@ run_phpcsfixer
RUN_RESULT_PHPCSFIXER=$?
EXIT_CODE=$((EXIT_CODE + RUN_RESULT_PHPCSFIXER))
# Update all the @SuppressWarnings tags so that phpstan do not complain with them
# by adding double quotes around the message inside the @SuppressWarnings tag
# @see https://github.com/phpstan/phpdoc-parser/issues/256
log_info "CHECK FOR @SuppressWarnings() UNQUOTED ANNOTATIONS IN SOURCE CODE"
find "$CURRDIR/src/" -name "*.php" -exec sed -i.bak -E 's/@SuppressWarnings\(([^"\(\)]*)\)/@SuppressWarnings("\1")/g' {} \;
find "$CURRDIR/src/" -name "*.bak" -exec rm {} \;
# If the library contains -cache- in its name, it uses psr/cache or psr/simple-cache
# interfaces libraries. Such libraries enforce the mixed type as output, so ignore
# the ban mixed requirement for such libraries
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment