for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Lamoda\Metric\Common;
use Lamoda\Metric\Storage\MutableMetricInterface;
final class Metric implements MutableMetricInterface
{
/** @var string */
private $name;
/** @var float */
private $value;
/** @var string[] */
private $tags;
/**
* Metric constructor.
*
* @param string $name
* @param float $value
* @param string[] $tags
*/
public function __construct(string $name, float $value, array $tags = [])
$this->name = $name;
$this->value = $value;
$this->tags = $tags;
}
/** {@inheritdoc} */
public function getName(): string
return $this->name;
public function resolve(): float
return $this->value;
public function getTags(): array
return $this->tags;
public function adjust(float $delta): void
$this->value += $delta;
public function setValue(float $value): void