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
Lint
Lint Not Applicable
Unit
Tests Not Applicable