-
-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathUtfStringSerializer.php
More file actions
28 lines (23 loc) · 552 Bytes
/
UtfStringSerializer.php
File metadata and controls
28 lines (23 loc) · 552 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Tests;
use PhpMyAdmin\SqlParser\UtfString;
class UtfStringSerializer
{
/**
* @return array<string,string>
* @psalm-return array{str: string}
*/
public function serialize(UtfString $str): array
{
return ['str' => (string) $str];
}
/**
* @param array<string,string> $data
* @psalm-param array{str: string} $data
*/
public function unserialize(array $data): UtfString
{
return new UtfString($data['str']);
}
}