Problem/Motivation

It can help to avoid bugs and give type-hinting to IDEs.

Proposed resolution

  • Declare strict types
  • Add types for class variables
  • Add return types to functions

Remaining tasks

User interface changes

API changes

There were some contradictions/ambiguities resolved as follows

  1. MailerPolicyInterface::getEntityLabel() and ::getTag()
    before: documented as return string, yet return NULL if value
    after: return empty if no value
  2. Address::__construct 2nd and 3rd parameters
    before: accepts NULL, but the get functions documented as returning string
    after: accepts empty string, but not null
  3. Email::setBody()
    before: documented as accept mixed, but getBody() documented as return array and comments all talk about arrays
    after: requires array

Data model changes

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

adamps created an issue. See original summary.

adamps’s picture

Issue summary: View changes
adamps’s picture

Status: Active » Fixed

  • adamps committed ceec640e on 2.x
    Issue #3526466 by adamps: Add type checking
    
adamps’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.