<commit_before><?php

namespace Desk\Filter;

use DateTime;
use DateTimeZone;

/**
 * Converts dates between DateTime objects and ISO 8601 format strings
 */
class Date
{

    /**
     * Converts a date string (in the correct format) to a date object
     *
     * @param string $date A date string from the Desk.com API
     *
     * @return \DateTime
     */
    public static function stringToObject($date)
    {
        $format = DateTime::ISO8601;
        $zone = new DateTimeZone('UTC');
        return DateTime::createFromFormat(DateTime::ISO8601, $date, $zone);
    }

    /**
     * Converts a DateTime object to a string in the correct format
     *
     * @param \DateTime $date A DateTime object
     *
     * @return string
     */
    public static function objectToString(DateTime $date)<commit_msg>Remove unused assignment<commit_after><?php

namespace Desk\Filter;

use DateTime;
use DateTimeZone;

/**
 * Converts dates between DateTime objects and ISO 8601 format strings
 */
class Date
{

    /**
     * Converts a date string (in the correct format) to a date object
     *
     * @param string $date A date string from the Desk.com API
     *
     * @return \DateTime
     */
    public static function stringToObject($date)
    {
        $zone = new DateTimeZone('UTC');
        return DateTime::createFromFormat(DateTime::ISO8601, $date, $zone);
    }

    /**
     * Converts a DateTime object to a string in the correct format
     *
     * @param \DateTime $date A DateTime object
     *
     * @return string
     */
    public static function objectToString(DateTime $date)
{'fraction_non_alphanumeric': 0.09425717852684144, 'fraction_numerical': 0.012484394506866416, 'mean_word_length': 2.6103603603603602, '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': '6115042', 'n_tokens_mistral': 454, 'n_tokens_neox': 438, 'n_words': 159}