| Total Complexity | 4 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class Common |
||
| 7 | { |
||
| 8 | public static function makeDummyQuery(array $values) |
||
| 9 | { |
||
| 10 | $res = fopen('php://temp', 'rw'); |
||
| 11 | fputs($res, static::makeDummyString($values)); |
||
| 12 | rewind($res); |
||
| 13 | return $res; |
||
| 14 | } |
||
| 15 | |||
| 16 | public static function makeDummyString(array $values) |
||
| 17 | { |
||
| 18 | return implode('', array_map(['\ProtocolsTests\Fsp\Common', 'makeDummyChars'], $values)); |
||
| 19 | } |
||
| 20 | |||
| 21 | public static function makeDummyChars($input): string |
||
| 22 | { |
||
| 23 | return (is_int($input)) ? chr($input) : strval($input); |
||
| 24 | } |
||
| 26 |