| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public static function fromFunctionNameLimit(string $internalFunctionName, int $limit): self |
||
| 12 | { |
||
| 13 | $message = \sprintf( |
||
| 14 | 'Function %s is not expected to be called more than %d %s. In:%s', |
||
| 15 | $internalFunctionName, |
||
| 16 | $limit, |
||
| 17 | $limit > 1 ? 'times' : 'time', |
||
| 18 | "\n" . self::getCustomTrace() |
||
| 19 | ); |
||
| 20 | |||
| 21 | return new static($message); |
||
| 22 | } |
||
| 24 |