this morning I faced with this issue and I don't know really how to solve this.
Here's an image and a video: http://screencast.com/t/2ubAbwPj6
P.S. When I refactor the file to "filename.PHP" PhpStorm detects it but if I change it back to "filename.php" PhpStorm won't detect it as a PHP file.