How to programmatically check whether Magento 2 runs in the developer mode

See also: