Page MenuHomePhorge

Explicitly cast int to string when expected by PHP functions
ClosedPublic

Authored by aklapper on Mon, Jun 9, 17:52.

Details

Summary

Avoid Parameter $foo of function bar expects string, int given output in static code analysis by explicitly casting to string when a return value is an int, or by passing a string by encapsulating an int with apostrophes.

Test Plan

Run static code analysis (phpstan).

Diff Detail

Repository
rARC Arcanist
Branch
castInt2String (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2079
Build 2079: arc lint + arc unit