<commit_before><?php

/**
 * League.Period (https://period.thephpleague.com)
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace League\Period;

enum Bounds: string
{
    case INCLUDE_START_EXCLUDE_END = '[)';
    case INCLUDE_ALL = '[]';
    case EXCLUDE_START_INCLUDE_END = '(]';
    case EXCLUDE_ALL = '()';

    public function isStartIncluded(): bool
    {
        return self::INCLUDE_START_EXCLUDE_END === $this || self::INCLUDE_ALL === $this;
    }

    public function isEndIncluded(): bool
    {
        return self::EXCLUDE_START_INCLUDE_END === $this || self::INCLUDE_ALL === $this;
    }

    public function equalsStart(self $other): bool
    {
        return match ($this) {
            self::INCLUDE_ALL, self::INCLUDE_START_EXCLUDE_END => $other->isStartIncluded(),
            default => !$other->isStartIncluded(),
        };
    }

    public function equalsEnd(self $other): bool
    {
        return match ($this) {
            self::INCLUDE_ALL, self::EXCLUDE_START_INCLUDE_END => $other->isEndIncluded(),
            default => !$other->isEndIncluded(),
        };
    }
<commit_msg>Improve Bounds enum<commit_after><?php

/**
 * League.Period (https://period.thephpleague.com)
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace League\Period;

enum Bounds: string
{
    case INCLUDE_START_EXCLUDE_END = '[)';
    case INCLUDE_ALL = '[]';
    case EXCLUDE_START_INCLUDE_END = '(]';
    case EXCLUDE_ALL = '()';

    public function isStartIncluded(): bool
    {
        return match ($this) {
            self::INCLUDE_START_EXCLUDE_END, self::INCLUDE_ALL => true,
            default => false,
        };
    }

    public function isEndIncluded(): bool
    {
        return match ($this) {
            self::EXCLUDE_START_INCLUDE_END, self::INCLUDE_ALL => true,
            default => false,
        };
    }

    public function equalsStart(self $other): bool
    {
        return match ($this) {
            self::INCLUDE_ALL, self::INCLUDE_START_EXCLUDE_END => $other->isStartIncluded(),
            default => !$other->isStartIncluded(),
        };
    }

    public function equalsEnd(self $other): bool
    {
        return match ($this) {
            self::INCLUDE_ALL, self::EXCLUDE_START_INCLUDE_END => $other->isEndIncluded(),
            default => !$other->isEndIncluded(),
        };
    }

{'fraction_non_alphanumeric': 0.133852140077821, 'fraction_numerical': 0.0, 'mean_word_length': 2.720694645441389, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 29, 'https://': 2, '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': '7341001', 'n_tokens_mistral': 822, 'n_tokens_neox': 760, 'n_words': 172}