There should be one PHP class per file, not multiple. Any files where this isn't the case should be fixed up.
Find a PHP file that has more than one class/interface in it (in MediaWiki core, a WMF deployed extension, or any other extension), and split the classes into individual files, that are named the same as the class itself.
Update any autoloader references to the class in the old file to point in the new file. In core this is autoload.php, in extensions this may be in the PHP entry point, or in extension.json