IMO `return null` is more correct, as before you have other `return $file;`, so IDE etc. will for sure complain about inconsensity with just `return;`.