<commit_before>﻿namespace Snow
{
    using Enums;
    using Models;

    public static class ShouldProcess
    {
        public static bool Archive(Post post)
        {
            return post.Published == Published.True;
        }

        public static bool Category(Post post)
        {
            return post.Published == Published.True;
        }

        public static bool Category(Category category)
        {
            return category.Count > 0;
        }

        public static bool Feed(Post post)
        {
            return post.Published == Published.True;
        }

        public static bool Posts(Post post)
        {
            return post.Published == Published.True;
        }
    }
}<commit_msg>Extract IsPublished method and remove duplicated published check<commit_after>﻿namespace Snow
{
    using Enums;
    using Models;

    public static class ShouldProcess
    {
        public static bool Archive(Post post)
        {
            return IsPublished(post);
        }

        public static bool Category(Post post)
        {
            return IsPublished(post);
        }

        public static bool Category(Category category)
        {
            return category.Count > 0;
        }

        public static bool Feed(Post post)
        {
            return IsPublished(post);
        }

        public static bool Posts(Post post)
        {
            return IsPublished(post);
        }

        private static bool IsPublished(Post post)
        {
            return post.Published == Published.True;
        }
    }
}
{'fraction_non_alphanumeric': 0.06568446899938613, 'fraction_numerical': 0.0012277470841006752, 'mean_word_length': 1.4148148148148147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5970545', 'n_tokens_mistral': 417, 'n_tokens_neox': 372, 'n_words': 111}