Problem/Motivation
See #3483037: [META] Add return types to hook implementations
Steps to reproduce
Find all occurrences in the baseline:
grep "Function .*_preprocess_.*\\\\.* has no return type specified" core/.phpstan-baseline.php
Proposed resolution
Add : void
to each of them using these commands, and update a few stragglers after:
find core -type f -exec sed -i '/Implements hook_preprocess_/,/\(function .*_preprocess_.*(.*)\) *{/!b;/\(function .*_preprocess_.*(.*)\) *{/s/\(function .*_preprocess_.*(.*)\) *{/\1: void {/' {} +
find core -type f -exec sed -i 's/\(function template_preprocess_[^(]*(.*)\) {/\1: void {/' {} +
find core -type f -exec sed -i '/Implements template_preprocess_/,/\(function .*_preprocess_.*(.*)\) *{/!b;/\(function .*_preprocess_.*(.*)\) *{/s/\(function .*_preprocess_.*(.*)\) *{/\1: void {/' {} +