<?php

namespace goals\traits;

trait goals_target_t
{
    /**
     * Target (Goal target value)
     * @var float $target
     */
    public float $target = 0.0;

    /**
     * Set the target value
     * @param float|int $value
     * @return void
     */
    public function setTarget(float|int $value): void
    {
        $this->target = (float)$value;
    }

    /**
     * Get the target value
     * @return float
     */
    public function getTarget(): float
    {
        return $this->target;
    }
}