| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function __construct($command, $key, $value, $flags = 0, $expiration = 0) |
||
| 17 | { |
||
| 18 | // Serialize non-numeric values. Numeric values should stay as they are |
||
| 19 | // because they could be incremented/decremented. |
||
| 20 | $value = is_numeric($value) ? $value : serialize($value); |
||
| 21 | |||
| 22 | $command = implode(' ', [$command, $key, $flags, $expiration, strlen($value)]); |
||
| 23 | |||
| 24 | $this->command = $command . Parser::COMMAND_SEPARATOR . $value . Parser::COMMAND_SEPARATOR; |
||
| 25 | } |
||
| 27 |