Conditions | 5 |
Paths | 5 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
61 | public function readInformation($textEncoding) |
||
62 | { |
||
63 | $this->stream->seek(1); |
||
64 | |||
65 | $information = $this->stream->read($this->stream->getSize() - 1); |
||
66 | |||
67 | switch ($textEncoding) { |
||
68 | case Encoding::ISO_8859_1: |
||
69 | return iconv('ISO-8859-1', 'UTF-8', $information); |
||
70 | case Encoding::UTF_16: |
||
71 | return iconv('UTF-16', 'UTF-8', $information); |
||
72 | case Encoding::UTF_16BE: |
||
73 | return iconv('UTF-16BE', 'UTF-8', $information); |
||
74 | case Encoding::UTF_16LE: |
||
75 | return iconv('UTF-16LE', 'UTF-8', $information); |
||
76 | } |
||
77 | |||
78 | return $information; |
||
79 | } |
||
80 | } |
||
81 |