PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
Runner: show actionable information when PHPCS runs out of memory
As discussed in #3621, this PR adds a new function to show a "friendly" error message if/when PHPCS runs out of memory.
This functionality can't be tested via the unit/integration test suite as the PHP shutdown can't be mocked.
To test the functionality, I used a test run of PHPCS over its own code base with the following command:
phpcs -d memory_limit 32M
This should yield something along the lines of the below screenshot:

Fixes #3621