for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* User: alec
* Date: 30.11.18
* Time: 17:42
*/
namespace AlecRabbit\Tools\Traits;
use AlecRabbit\Traits\GettableName;
trait CounterFields
{
use GettableName;
/** @var int */
protected $value = 0;
protected $max = 0;
protected $min = 0;
protected $path = 0;
protected $length = 0;
protected $initialValue = 0;
protected $diff = 0;
protected $step = 1;
protected $bumpedForward = 0;
protected $bumpedBack = 0;
/** @var bool */
protected $started = false;
* @return int
public function getValue(): int
return $this->value;
}
public function getMax(): int
return $this->max;
public function getMin(): int
return $this->min;
public function getPath(): int
return $this->path;
public function getLength(): int
return $this->length;
public function getInitialValue(): int
return $this->initialValue;
public function getDiff(): int
return $this->diff = $this->value - $this->initialValue;
public function getStep(): int
return $this->step;
public function getBumpedForward(): int
return $this->bumpedForward;
public function getBumpedBack(): int
return $this->bumpedBack;
* @return bool
public function isStarted(): bool
return $this->started;