Thanks for posting all of this and making use of Local and Xdebug!
That script is what Local uses to help define the WP_ENVIRONMENT_TYPE variable. There’s more discussion about this in the following topic along with some adjustments that can be made to prevent this PHPStorm from breaking on this file:
If it interests you, you can also upvote this feature request to remove this file: