| Code Coverage
| Lines | Functions and Methods | Classes and Traits
Total | 100.00% covered (success) | 100.00% | 1 / 1 | 100.00% covered (success) | 100.00% | 1 / 1 | CRAP | 100.00% covered (success) | 100.00% | 1 / 1
MetadataData | 100.00% covered (success) | 100.00% | 1 / 1 | 100.00% covered (success) | 100.00% | 1 / 1 | 2 | 100.00% covered (success) | 100.00% | 1 / 1
__set | 100.00% covered (success) | 100.00% | 1 / 1 | 100.00% covered (success) | 100.00% | 1 / 1 | 2 |

1 | <?php
2 |
3 | namespace Attestto\SolanaPhpSdk\Accounts;
4 |
5 | use Attestto\SolanaPhpSdk\Borsh;
6 |
7 | class MetadataData
8 | {
9 | use Borsh\BorshObject;
10 |
11 | public const SCHEMA = [
12 | Creator::class => Creator::SCHEMA[Creator::class],
13 | self::class => [
14 | 'kind' => 'struct',
15 | 'fields' => [
16 | ['name', 'string'],
17 | ['symbol', 'string'],
18 | ['uri', 'string'],
19 | ['sellerFeeBasisPoints', 'u16'],
20 | ['creators', [
21 | 'kind' => 'option',
22 | 'type' => [Creator::class]
23 | ]]
24 | ],
25 | ],
26 | ];
27 |
28 | public function __set($name, $value): void
29 | {
30 | $this->{$name} = is_string($value) ? preg_replace('/[[:cntrl:]]/', '', $value) : $value;
31 | }
32 | }