Add return types for all methods with a rector rule

Created on 8 October 2025, 5 days ago

Problem/Motivation

We should add return types to all methods. This can be done with a rector rule.

This will need to be done as part of a new major version as existing code that extends these classes will break if they don't implement the return types.

Steps to reproduce

Proposed resolution

Use the following rector rule:

<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;

return RectorConfig::configure()
  // this should match where the module lives relative to composer root.
  ->withPaths([__DIR__ . '/modules/custom/search_api'])
  ->withTypeCoverageLevel(10);

Remaining tasks

πŸ“Œ Task
Status

Active

Version

1.0

Component

General code

Created by

πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Pipeline finished with Success
    5 days ago
    Total: 365s
    #621206
  • Pipeline finished with Failed
    5 days ago
    Total: 364s
    #621214
  • Pipeline finished with Failed
    5 days ago
    Total: 268s
    #621232
  • Pipeline finished with Success
    5 days ago
    Total: 372s
    #621263
Production build 0.71.5 2024