Problem/Motivation

This is a child issue of #3404246: [META] Fix strict type errors detected by phpstan in order to reduce the scope.

The scope includes any issues detected by FunctionCallParametersCheck where the function is expecting an int but receiving a float. This seems to occur when using functions like round or ceil that return float.

Steps to reproduce

See parent

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3461945

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

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review
bbrala’s picture

Status: Needs review » Reviewed & tested by the community

The three calls are ceil and round. Which means we are not running into the problem that (int) cast will always round down. Changes are clear, output is correct. RTBC for me.

  • catch committed e9eff5cd on 10.3.x
    Issue #3461945 by mstrelan, bbrala: Fix instances of floats passed to...

  • catch committed 6d303114 on 10.4.x
    Issue #3461945 by mstrelan, bbrala: Fix instances of floats passed to...
catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked back through to 10.3.x, thanks!

  • catch committed bac04ac5 on 11.0.x
    Issue #3461945 by mstrelan, bbrala: Fix instances of floats passed to...

  • catch committed 4d805e5d on 11.x
    Issue #3461945 by mstrelan, bbrala: Fix instances of floats passed to...

Status: Fixed » Closed (fixed)

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