<commit_before><?php

namespace MattJanssen\ApiResponseBundle\Model;

use MattJanssen\ApiResponseBundle\Serializer\ArraySerializable;

/**
 * API Response Response Model
 *
 * This is the base object that is finally serialized into a Symfony Response.
 * It includes the data object and error object, both of which are optional.
 *
 * @author <NAME> <<EMAIL>>
 */
class ApiResponseResponseModel implements \JsonSerializable, ArraySerializable
{
    /**
     * Serializable API Response Data
     *
     * @var mixed
     */
    private $data;

    /**
     * API Error Model
     *
     * @var ApiResponseErrorModel
     */
    private $error;

    /**
     * {@inheritdoc}
     */
    public function jsonSerialize(): array
    {
        return [
            'data' => $this->data,
            'error' => $this->error,
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function arraySerialize(array $group = [])
    {
        return $this->jsonSerialize();<commit_msg>Remove PHP 7 return type<commit_after><?php

namespace MattJanssen\ApiResponseBundle\Model;

use MattJanssen\ApiResponseBundle\Serializer\ArraySerializable;

/**
 * API Response Response Model
 *
 * This is the base object that is finally serialized into a Symfony Response.
 * It includes the data object and error object, both of which are optional.
 *
 * @author <NAME> <<EMAIL>>
 */
class ApiResponseResponseModel implements \JsonSerializable, ArraySerializable
{
    /**
     * Serializable API Response Data
     *
     * @var mixed
     */
    private $data;

    /**
     * API Error Model
     *
     * @var ApiResponseErrorModel
     */
    private $error;

    /**
     * {@inheritdoc}
     */
    public function jsonSerialize()
    {
        return [
            'data' => $this->data,
            'error' => $this->error,
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function arraySerialize(array $group = [])
    {
        return $this->jsonSerialize();
{'fraction_non_alphanumeric': 0.11398176291793313, 'fraction_numerical': 0.0005065856129685917, 'mean_word_length': 2.3361486486486487, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '3209695', 'n_tokens_mistral': 553, 'n_tokens_neox': 557, 'n_words': 152}