Problem/Motivation

Functions and methods lack clear parameter and return type declarations, causing potential type-related errors in the codebase.

Proposed resolution

Add explicit return type declarations to functions and methods to define expected return types clearly. This change improves code clarity, reduces ambiguity, and helps prevent type-related errors.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kuzyawkk created an issue. See original summary.

kuzyawkk’s picture

Assigned: kuzyawkk » Unassigned
Status: Active » Needs review
anybody’s picture

Status: Needs review » Needs work

Thanks @kuzyawkk correct. We should use this chance to also fix the two related phpcs errors: https://git.drupalcode.org/issue/role_expire-3471139/-/pipelines/270211

rishabjasrotia made their first commit to this issue’s fork.

rishabjasrotia’s picture

Assigned: Unassigned » rishabjasrotia
rishabjasrotia’s picture

rishabjasrotia’s picture

Status: Needs work » Needs review
anybody’s picture

Assigned: rishabjasrotia » Unassigned

Thanks @rishabjasrotia! LGTM!! phpcs is also green now.

rcodina made their first commit to this issue’s fork.

rcodina’s picture

Title: Return type declarations » Add parameter and return types declarations
Issue summary: View changes
rcodina’s picture

Issue summary: View changes

Please, review.

anybody’s picture

Status: Needs review » Needs work
rcodina’s picture

Status: Needs work » Needs review

Fixed.

rcodina’s picture

@kuzyawkk @anybody @rishabjasrotia Please, review.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @rcodina LGTM! Please mind credits, when merging and setting the issues fixed :)

rcodina’s picture

Setting issue credits.

  • rcodina committed f99380cb on 4.x authored by kuzyawkk
    Issue #3471139 by kuzyawkk, rcodina, rishabjasrotia, anybody: Add...
rcodina’s picture

Status: Reviewed & tested by the community » Fixed
rcodina’s picture

Status: Fixed » Closed (fixed)

Included in new 4.1.0 release.