<commit_before><?php

namespace Phighchart\Format;

use Phighchart\Chart;
use Phighchart\Options\Container;
use Phighchart\Format\FormatInterface;

/**
 * Standard linear chart plot format
 * @author  <NAME> <<EMAIL>>
 */
class Linear implements FormatInterface
{
    /**
     * Sets the xAxis category labels for the linear chart plots
     * @param  Chart  $chart instance of the current Chart object
     * @return Mixed, Phighchart\Container if the series data is set, boolean false otherwise
     */
    public function getFormatOptions(Chart $chart)
    {
        $data = $chart->getData();
        if ($data && $seriesData = $data->getSeries()) {
            $xAxis = $chart->getOptionsType('xAxis', new Container('xAxis'));
            // create the X-Axis categories from the last seen series
            $xAxis->setCategories(array_keys(array_pop($seriesData)));

            return $xAxis;
        }

        return false;
    }

    /**
     * Returns the plottable chart data
     * @param  Array $seriesData
     * @return Array
     */
    public function getFormattedChartData(Array $seriesData)
    {
        return array_values($seriesData);
    }
}<commit_msg>Update Linear.php<commit_after><?php

namespace Phighchart\Format;

use Phighchart\Chart;
use Phighchart\Options\Container;
use Phighchart\Format\FormatInterface;

/**
 * Standard linear chart plot format
 * @author  <NAME> <<EMAIL>>
 */
class Linear implements FormatInterface
{
    /**
     * Sets the xAxis category labels for the linear chart plots
     * @param  Chart  $chart instance of the current Chart object
     * @return Mixed Phighchart\Container if the series data is set, boolean false otherwise
     */
    public function getFormatOptions(Chart $chart)
    {
        $data = $chart->getData();
        if ($data && $seriesData = $data->getSeries()) {
            $xAxis = $chart->getOptionsType('xAxis', new Container('xAxis'));
            // create the X-Axis categories from the last seen series
            $xAxis->setCategories(array_keys(array_pop($seriesData)));

            return $xAxis;
        }

        return false;
    }

    /**
     * Returns the plottable chart data
     * @param  Array $seriesData
     * @return Array
     */
    public function getFormattedChartData(Array $seriesData)
    {
        return array_values($seriesData);
    }
}
{'fraction_non_alphanumeric': 0.10504023718763236, 'fraction_numerical': 0.0, 'mean_word_length': 2.7314375987361768, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '7231615', 'n_tokens_mistral': 656, 'n_tokens_neox': 643, 'n_words': 193}