| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.3931 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 1 | public function __toString(): string |
|
| 34 | { |
||
| 35 | 1 | if (DEFAULT_NAME === $name = $this->getName()) { |
|
| 36 | return |
||
| 37 | 1 | sprintf( |
|
| 38 | 1 | 'Counter: %s(%s)%s', |
|
| 39 | 1 | $this->getValue(), |
|
| 40 | 1 | $this->getStep(), |
|
| 41 | 1 | PHP_EOL |
|
| 42 | ); |
||
| 43 | } |
||
| 44 | return |
||
| 45 | sprintf( |
||
| 46 | 'Counter:[%s] Value: %s, Step: %s %s', |
||
| 47 | $name, |
||
| 48 | $this->getValue(), |
||
| 49 | $this->getStep(), |
||
| 50 | PHP_EOL |
||
| 51 | ); |
||
| 54 |