Passed
Pull Request — master (#75)
by
unknown
12:43
created

JSONConverter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 6
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Stream\Data;
6
7
final class JSONConverter implements Converter
8
{
9
    public function convert($data, array $params = []): string
10
    {
11
        // of course you can use JsonSerializer
12
        return json_encode($data, JSON_PRETTY_PRINT|JSON_INVALID_UTF8_IGNORE|JSON_UNESCAPED_UNICODE);
13
    }
14
}
15