<commit_before><?php

namespace AtomicPHP\FailureHandling\Exceptions;

/**
 * ErrorException
 *
 * @author  <NAME> <<EMAIL>>
 * @package AtomicPHP\Failurehandling\Exceptions
 **/
class ErrorException extends \ErrorException {

    /**
     * getSeverityLevel
     *
     * Returns the severity level based on @see ErrorException::getCode
     *
     * @access public
     * @return string
     **/
    public function getSeverityLevel() {
        switch ($this->getCode() ) {
            case E_ERROR:
            case E_USER_ERROR:
                return SeverityLevel::ERROR;
                break;
            case E_WARNING:
            case E_USER_WARNING:
                return SeverityLevel::WARNING;
                break;
            case E_STRICT:
            case E_NOTICE:
            case E_USER_NOTICE:
            case E_DEPRECATED:
            case E_USER_DEPRECATED:
                return SeverityLevel::NOTICE;
                break;
            default:
                return SeverityLevel::CRITICAL;
                break;
        }<commit_msg>Fixed ErrorException based on failing unit tests<commit_after><?php

namespace AtomicPHP\FailureHandling\Exceptions;

use \AtomicPHP\FailureHandling\SeverityLevel;

/**
 * ErrorException
 *
 * @author  <NAME> <<EMAIL>>
 * @package AtomicPHP\Failurehandling\Exceptions
 **/
class ErrorException extends \ErrorException {

    /**
     * getSeverityLevel
     *
     * Returns the severity level based on @see ErrorException::getCode
     *
     * @access public
     * @return string
     **/
    public function getSeverityLevel() {
        switch ($this->getCode() ) {
            case E_ERROR:
            case E_USER_ERROR:
            case E_RECOVERABLE_ERROR:
                return SeverityLevel::ERROR;
                break;
            case E_WARNING:
            case E_USER_WARNING:
                return SeverityLevel::WARNING;
                break;
            case E_STRICT:
            case E_NOTICE:
            case E_USER_NOTICE:
            case E_DEPRECATED:
            case E_USER_DEPRECATED:
                return SeverityLevel::NOTICE;
                break;
            default:
                return SeverityLevel::CRITICAL;
                break;
        }
{'fraction_non_alphanumeric': 0.07763975155279502, 'fraction_numerical': 0.0, 'mean_word_length': 1.6877234803337307, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4207975', 'n_tokens_mistral': 623, 'n_tokens_neox': 596, 'n_words': 134}