Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291228

Add void return type to all hook_cron implementations

$
0
0

Problem/Motivation

See #3483037: [META] Add return types to hook implementations

Steps to reproduce

Find all occurrences in the baseline:

grep "Method .*cron\\\\.* has no return type specified" core/.phpstan-baseline.php

Proposed resolution

Add : void to each of them.

Updated command for use in Hooks classes.
find . -type f -path "*/src/Hook/*.php" -exec sed -i "/#\[Hook('cron')\]/ {N;s/\(public function \w*()\)/\1: void/}" {} +

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 291228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>