Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | public function writeToStream(SplFileObject $fileObject, $encryptionKey) |
||
42 | { |
||
43 | $value = $this->value; |
||
44 | |||
45 | if (null !== $encryptionKey) { |
||
46 | (new HexadecimalStringObject($value))->writeToStream($fileObject, $encryptionKey); |
||
47 | return; |
||
48 | } |
||
49 | |||
50 | $fileObject->fwrite('('); |
||
51 | $fileObject->fwrite(chunk_split(strtr($value, [ |
||
52 | '(' => '\\(', |
||
53 | ')' => '\\)', |
||
54 | '\\' => '\\\\', |
||
55 | ]), 255, "\\\n")); |
||
56 | $fileObject->fwrite(')'); |
||
57 | } |
||
58 | } |
||
59 |