Cast file id's to int so we can compare them properly

Fixes #10397 

cc @schiesbn @DeepDiver1975 @PVince81 
Seems like an auto generated phpdoc, will verify its usages