With wp_get_environment_type(): string one can get the current state of the project. It returns production by default, otherwise local, development or staging can be used.
It can be set in the wp-config.php file as :
define( 'WP_ENVIRONMENT_TYPE', 'development' );
Sources :