| Total Complexity | 9 |
| Total Lines | 103 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | trait CounterFields |
||
| 13 | { |
||
| 14 | use GettableName; |
||
| 15 | |||
| 16 | /** @var int */ |
||
| 17 | protected $value = 0; |
||
| 18 | |||
| 19 | /** @var int */ |
||
| 20 | protected $path = 0; |
||
| 21 | |||
| 22 | /** @var int */ |
||
| 23 | protected $length = 0; |
||
| 24 | |||
| 25 | 9 | /** @var int */ |
|
| 26 | protected $initialValue = 0; |
||
| 27 | 9 | ||
| 28 | /** @var int */ |
||
| 29 | protected $diff = 0; |
||
| 30 | |||
| 31 | /** @var int */ |
||
| 32 | protected $step = 1; |
||
| 33 | 12 | ||
| 34 | /** @var int */ |
||
| 35 | 12 | protected $bumpedForward = 0; |
|
| 36 | |||
| 37 | /** @var int */ |
||
| 38 | protected $bumpedBack = 0; |
||
| 39 | |||
| 40 | /** @var bool */ |
||
| 41 | protected $started = false; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return int |
||
| 45 | */ |
||
| 46 | public function getValue(): int |
||
| 47 | { |
||
| 48 | return $this->value; |
||
| 49 | } |
||
| 50 | |||
| 51 | |||
| 52 | /** |
||
| 53 | * @return int |
||
| 54 | */ |
||
| 55 | public function getPath(): int |
||
| 56 | { |
||
| 57 | return $this->path; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public function getLength(): int |
||
| 64 | { |
||
| 65 | return $this->length; |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return int |
||
| 70 | */ |
||
| 71 | public function getInitialValue(): int |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return int |
||
| 78 | */ |
||
| 79 | public function getDiff(): int |
||
| 80 | { |
||
| 81 | return $this->diff = $this->value - $this->initialValue; |
||
| 82 | } |
||
| 83 | |||
| 84 | |||
| 85 | /** |
||
| 86 | * @return int |
||
| 87 | */ |
||
| 88 | public function getStep(): int |
||
| 89 | { |
||
| 90 | return $this->step; |
||
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @return int |
||
| 95 | */ |
||
| 96 | public function getBumpedForward(): int |
||
| 97 | { |
||
| 98 | return $this->bumpedForward; |
||
| 99 | } |
||
| 100 | |||
| 101 | /** |
||
| 102 | * @return int |
||
| 103 | */ |
||
| 104 | public function getBumpedBack(): int |
||
| 105 | { |
||
| 106 | return $this->bumpedBack; |
||
| 107 | } |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @return bool |
||
| 111 | */ |
||
| 112 | public function isStarted(): bool |
||
| 115 | } |
||
| 116 | } |
||
| 117 |