<commit_before><?php
namespace GraphQL\Error;

final class Warning
{
    const NAME_WARNING = 1;
    const ASSIGN_WARNING = 2;
    const CONFIG_WARNING = 4;

    const ALL = self::NAME_WARNING | self::ASSIGN_WARNING | self::CONFIG_WARNING;

    static $enableWarnings = self::ALL;

    static $warned = [];

    static function suppress($suppress = true)
    {
        if (true === $suppress) {
            self::$enableWarnings = 0;
        } else if (false === $suppress) {
            self::$enableWarnings = self::ALL;
        } else {
            $suppress = (int) $suppress;
            self::$enableWarnings &= ~$suppress;
        }
    }

    static function warnOnce($errorMessage, $warningId)
    {
        if ((self::$enableWarnings & $warningId) > 0 && !isset(self::$warned[$warningId])) {
            self::$warned[$warningId] = true;
            trigger_error($errorMessage, E_USER_WARNING);
        }
    }

    static function warn($errorMessage, $warningId)
    {
        if ((self::$enableWarnings & $warningId) > 0) {
            trigger_error($errorMessage, E_USER_WARNING);
        }
    }
}
<commit_msg>Fix for broken build on PHP < 5.6<commit_after><?php
namespace GraphQL\Error;

final class Warning
{
    const NAME_WARNING = 1;
    const ASSIGN_WARNING = 2;
    const CONFIG_WARNING = 4;

    const ALL = 7;

    static $enableWarnings = self::ALL;

    static $warned = [];

    static function suppress($suppress = true)
    {
        if (true === $suppress) {
            self::$enableWarnings = 0;
        } else if (false === $suppress) {
            self::$enableWarnings = self::ALL;
        } else {
            $suppress = (int) $suppress;
            self::$enableWarnings &= ~$suppress;
        }
    }

    static function warnOnce($errorMessage, $warningId)
    {
        if ((self::$enableWarnings & $warningId) > 0 && !isset(self::$warned[$warningId])) {
            self::$warned[$warningId] = true;
            trigger_error($errorMessage, E_USER_WARNING);
        }
    }

    static function warn($errorMessage, $warningId)
    {
        if ((self::$enableWarnings & $warningId) > 0) {
            trigger_error($errorMessage, E_USER_WARNING);
        }
    }
}

{'fraction_non_alphanumeric': 0.13502492070684186, 'fraction_numerical': 0.006796556411418215, 'mean_word_length': 2.3709923664122137, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, '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': '5410018', 'n_tokens_mistral': 671, 'n_tokens_neox': 668, 'n_words': 142}