<commit_before><?php

/**
 * HiPay Fullservice SDK PHP
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Apache 2.0 Licence
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * @copyright      Copyright (c) 2016 - HiPay
 * @license        http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 Licence
 *
 */

namespace HiPay\Fullservice\Data;

/**
 * Category object
 *
 * @package HiPay\Fullservice
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2017 - HiPay
 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 License
 * @link https://github.com/hipay/hipay-fullservice-sdk-php
 * @api
 */
class Category {

    CONST DEFAULT_LANG_ISO_CODE = "EN";

    /**
     * @var int $_code Technical code
     */
    private $_code;

    /**
     * @var string $_name Human readable value
     */
    private $_name;

    /**
     * @var array $_locals translations
     */
    private $_locals;

    /**
     * Category constructor.
     *
     * @param $code
     * @param $name
     */
    public function __construct($code, $name, $locals) {

        $this->_code = $code;
        $this->_name = $name;
        $this->_locals = $locals;
    }

    /**
     * @return int
     */
    public function getCode() {
        return $this->_code;
    }

    /**
     * @return string
     */
    public function getName() {
        return $this->_name;
    }

    /**
     * @return string
     */
    public function getLocal($langIsoCode = DeliveryMethodAttribute::DEFAULT_LANG_ISO_CODE) {

        if (isset($this->_locals[$langIsoCode])) {
            return $this->_locals[$langIsoCode];
        }

        return $this->_locals[Category::DEFAULT_LANG_ISO_CODE];
    }

    /**
     * @param array $locals
     */
    public function setLocals($locals) {
        $this->_locals = $locals;
    }
<commit_msg>add translation in category collection<commit_after><?php

/**
 * HiPay Fullservice SDK PHP
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Apache 2.0 Licence
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * @copyright      Copyright (c) 2016 - HiPay
 * @license        http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 Licence
 *
 */

namespace HiPay\Fullservice\Data;

/**
 * Category object
 *
 * @package HiPay\Fullservice
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2017 - HiPay
 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 License
 * @link https://github.com/hipay/hipay-fullservice-sdk-php
 * @api
 */
class Category {

    CONST DEFAULT_LANG_ISO_CODE = "EN";

    /**
     * @var int $_code Technical code
     */
    private $_code;

    /**
     * @var string $_name Human readable value
     */
    private $_name;

    /**
     * @var array $_locals translations
     */
    private $_locals;

    /**
     * Category constructor.
     *
     * @param $code
     * @param $name
     */
    public function __construct($code, $name, $locals) {

        $this->_code = $code;
        $this->_name = $name;
        $this->_locals = $locals;
    }

    /**
     * @return int
     */
    public function getCode() {
        return $this->_code;
    }

    /**
     * @return string
     */
    public function getName() {
        return $this->_name;
    }

    /**
     * @return string
     */
    public function getLocal($langIsoCode = Category::DEFAULT_LANG_ISO_CODE) {

        if (isset($this->_locals[$langIsoCode])) {
            return $this->_locals[$langIsoCode];
        }

        return $this->_locals[Category::DEFAULT_LANG_ISO_CODE];
    }

    /**
     * @param array $locals
     */
    public function setLocals($locals) {
        $this->_locals = $locals;
    }

{'fraction_non_alphanumeric': 0.13719512195121952, 'fraction_numerical': 0.01016260162601626, 'mean_word_length': 2.213877551020408, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, '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': '6801328', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1218, 'n_words': 300}