<commit_before><?php

namespace SilverStripe\EnvironmentCheck\Checks;

use SilverStripe\Control\Director;
use SilverStripe\Control\Controller;
use SilverStripe\ORM\ValidationResult;
use Psr\Http\Message\ResponseInterface;
use SilverStripe\Core\Config\Configurable;
use SilverStripe\EnvironmentCheck\Traits\Fetcher;
use SilverStripe\EnvironmentCheck\EnvironmentCheck;

/**
 * Check cache headers for any response, can specify directives that must be included and
 * also must be excluded from Cache-Control headers in response. Also checks for
 * existence of ETag.
 *
 * @example SilverStripe\EnvironmentCheck\Checks\CacheHeadersCheck("/", ["must-revalidate", "max-age=120"], ["no-store"])
 * @package environmentcheck
 */
class CacheHeadersCheck implements EnvironmentCheck
{
    use Configurable;
    use Fetcher;

    /**
     * URL to check
     *
     * @var string
     */
    protected $url;

    /**
     * Settings that must be included in the Cache-Control header
     *
     * @var array
     */
    protected $mustInclude = [];

    /**<commit_msg>FIX: Line length.<commit_after><?php

namespace SilverStripe\EnvironmentCheck\Checks;

use SilverStripe\Control\Director;
use SilverStripe\Control\Controller;
use SilverStripe\ORM\ValidationResult;
use Psr\Http\Message\ResponseInterface;
use SilverStripe\Core\Config\Configurable;
use SilverStripe\EnvironmentCheck\Traits\Fetcher;
use SilverStripe\EnvironmentCheck\EnvironmentCheck;

/**
 * Check cache headers for any response, can specify directives that must be included and
 * also must be excluded from Cache-Control headers in response. Also checks for
 * existence of ETag.
 *
 * @example SilverStripe\EnvironmentCheck\Checks\CacheHeadersCheck("/",["must-revalidate", "max-age=120"],["no-store"])
 * @package environmentcheck
 */
class CacheHeadersCheck implements EnvironmentCheck
{
    use Configurable;
    use Fetcher;

    /**
     * URL to check
     *
     * @var string
     */
    protected $url;

    /**
     * Settings that must be included in the Cache-Control header
     *
     * @var array
     */
    protected $mustInclude = [];

    /**
{'fraction_non_alphanumeric': 0.10084825636192271, 'fraction_numerical': 0.002827521206409048, 'mean_word_length': 3.8031674208144794, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5915613', 'n_tokens_mistral': 608, 'n_tokens_neox': 597, 'n_words': 162}