<commit_before><?php

/*
 * This file is part of the 'org.octris.core' package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace org\octris\core\type {
    /**
     * Money type.
     *
     * @octdoc      c:type/money
     * @copyright   copyright (c) 2010-2012 by <NAME>
     * @author      <NAME> <<EMAIL>>
     */
    class money extends \org\octris\core\type\number
    /**/
    {
        /**
         * Currency of money object (ISO 4217)
         *
         * @octdoc  p:money/$currency
         * @var     string
         */
        protected $currency = 'EUR';
        /**/

        /**
         * Stores instance of money exchange class.
         *
         * @octdoc  p:money/$xchg_service
         * @var     \org\octris\core\type\money\exchange_if
         */
        protected static $xchg_service = null;
        /**/

        /**
         * Constructor. Note that a money object can have a currency, which is not bound to the 
         * currently set locale. If a precision is specifed, the precision will only be used for 
         * returning the money amount. For internal calculations the default precision will be
         * used.
         *
         * @octdoc  m:money/__construct
         * @param   float       $value      Optional value for money object without locale specific characters.
         * @param   string      $currency   Optional curreny (ISO 4217) to set.
         * @param   int         $precision  Optional precision to use.
         */
        public function __construct($value = 0, $currency = null, $precision = 2)
        /**/
        {
            if (!is_null($currency)) {
                $this->currency = $currency;
            }
<commit_msg>store precision in class property<commit_after><?php

/*
 * This file is part of the 'org.octris.core' package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace org\octris\core\type {
    /**
     * Money type.
     *
     * @octdoc      c:type/money
     * @copyright   copyright (c) 2010-2012 by <NAME>
     * @author      <NAME> <<EMAIL>>
     */
    class money extends \org\octris\core\type\number
    /**/
    {
        /**
         * Currency of money object (ISO 4217)
         *
         * @octdoc  p:money/$currency
         * @var     string
         */
        protected $currency = 'EUR';
        /**/

        /**
         * Stores instance of money exchange class.
         *
         * @octdoc  p:money/$xchg_service
         * @var     \org\octris\core\type\money\exchange_if
         */
        protected static $xchg_service = null;
        /**/

        /**
         * Stores money precision.
         *
         * @octdoc  p:money/$precision
         * @var     int
         */
        protected $precision;
        /**/

        /**
         * Constructor. Note that a money object can have a currency, which is not bound to the 
         * currently set locale. If a precision is specifed, the precision will only be used for 
         * returning the money amount. For internal calculations the default precision will be
         * used.
         *
         * @octdoc  m:money/__construct
         * @param   float       $value      Optional value for money object without locale specific characters.
         * @param   string      $currency   Optional curreny (ISO 4217) to set.
         * @param   int         $precision  Optional precision to use.
         */
        public function __construct($value = 0, $currency = null, $precision = 2)
        /**/
        {
            if (!is_null($currency)) {
                $this->currency = $currency;
            }

            $this->precision = $precision;

{'fraction_non_alphanumeric': 0.10348387096774193, 'fraction_numerical': 0.00929032258064516, 'mean_word_length': 1.6136210384356036, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 20, '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': '1328019', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1047, 'n_words': 341}