<commit_before><?php
namespace Minds\Core\Blockchain\Metrics\Supply;

use Brick\Math\BigDecimal;
use Minds\Core\Blockchain\Metrics;
use Minds\Core\Data\ElasticSearch;

class TokensReclaimed extends Metrics\AbstractBlockchainMetric implements Metrics\BlockchainMetricInterface
{
    /** @var TokensReclaimedForBoost */
    protected $tokensReclaimedForBoost;

    /** @var  TokensReclaimedForUpgrades */
    protected $tokensReclaimedForUpgrades;

    public function __construct($tokensReclaimedForBoost = null, $tokensReclaimedForUpgrades = null, ...$injectables)
    {
        parent::__construct(...$injectables);
        $this->tokensReclaimedForBoost = $tokensReclaimedForBoost ?? new TokensReclaimedForBoost();
        $this->tokensReclaimedForUpgrades = $tokensReclaimedForUpgrades ?? new TokensReclaimedForUpgrades();
    }
    /**
     * @return BigDecimal
     */
    public function fetchOffchain(): BigDecimal
    {
        return $this->tokensReclaimedForBoost->getOffchain()->plus($this->tokensReclaimedForUpgrades->getOffchain());
    }

    /**
     * @return BigDecimal
     */
    public function fetchOnchain(): BigDecimal
    {
        return $this->tokensReclaimedForBoost->getOnchain()->plus($this->tokensReclaimedForUpgrades->getOnchain());
    }
}<commit_msg>(fix): tokens reclaimed not working outside of eggman<commit_after><?php
namespace Minds\Core\Blockchain\Metrics\Supply;

use Brick\Math\BigDecimal;
use Minds\Core\Blockchain\Metrics;
use Minds\Core\Data\ElasticSearch;

class TokensReclaimed extends Metrics\AbstractBlockchainMetric implements Metrics\BlockchainMetricInterface
{
    /** @var TokensReclaimedForBoost */
    protected $tokensReclaimedForBoost;

    /** @var  TokensReclaimedForUpgrades */
    protected $tokensReclaimedForUpgrades;

    public function __construct($tokensReclaimedForBoost = null, $tokensReclaimedForUpgrades = null, ...$injectables)
    {
        parent::__construct(...$injectables);
        $this->tokensReclaimedForBoost = $tokensReclaimedForBoost ?? new TokensReclaimedForBoost();
        $this->tokensReclaimedForUpgrades = $tokensReclaimedForUpgrades ?? new TokensReclaimedForUpgrades();
    }
    /**
     * @return BigDecimal
     */
    public function fetchOffchain(): BigDecimal
    {
        $this->tokensReclaimedForBoost->setTo($this->to)->setFrom($this->from);
        return $this->tokensReclaimedForBoost->fetchOffchain()->plus($this->tokensReclaimedForUpgrades->fetchOffchain());
    }

    /**
     * @return BigDecimal
     */
    public function fetchOnchain(): BigDecimal
    {
        $this->tokensReclaimedForBoost->setTo($this->to)->setFrom($this->from);
        return $this->tokensReclaimedForBoost->fetchOnchain()->plus($this->tokensReclaimedForUpgrades->fetchOnchain());
    }
}
{'fraction_non_alphanumeric': 0.11932227829848593, 'fraction_numerical': 0.0, 'mean_word_length': 4.2958015267175576, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '5034494', 'n_tokens_mistral': 799, 'n_tokens_neox': 793, 'n_words': 119}