public function setErrorReportingEnabled($enabled)
    {
        ini_set('log_errors', 1);

        if ($enabled) {
            ini_set('display_errors', 1);
            error_reporting(E_ALL);
        } else {
            ini_set('display_errors', 0);
            error_reporting(E_ALL | ~E_DEPRECATED);
        }

        $this->errorReportingEnabled = $enabled;

        return $this;
    }
public function setErrorReportingEnabled($enabled)
    {
        ini_set('log_errors', 1);

        if ($enabled) {
            ini_set('display_errors', 1);
            error_reporting(E_ALL);
        } else {
            ini_set('display_errors', 0);
            error_reporting(E_ALL | ~E_DEPRECATED);
        }

        $this->errorReportingEnabled = $enabled;

        return $this;
    }
public function setErrorReportingEnabled ( $ enabled ) { ini_set ( 'log_errors' , 1 ) ; if ( $ enabled ) { ini_set ( 'display_errors' , 1 ) ; error_reporting ( E_ALL ) ; } else { ini_set ( 'display_errors' , 0 ) ; error_reporting ( E_ALL | ~ E_DEPRECATED ) ; } $ this -> errorReportingEnabled = $ enabled ; return $ this ; }
Enable error reporting, setting display_errors to on and reporting to E_ALL

@param bool $enabled

@return $this
Enable error reporting setting display_errors to on and reporting to E_ALL