Scalr\Model\Entity\ScalingMetric::isUsed PHP Method

isUsed() public method

Checks whether the ScalingMetric is already used in some FarmRoleScalingMetric
public isUsed ( ) : integer | false
return integer | false Number of FarmRoleScalingMetric using this metric or false
    public function isUsed()
    {
        $metricsCount = $this->db()->GetOne("\n            SELECT COUNT(*)\n            FROM `farm_role_scaling_metrics`\n            WHERE `metric_id` = ?\n        ", [$this->id]);
        return $metricsCount ? $metricsCount : false;
    }