File tree Expand file tree Collapse file tree 1 file changed +0
-47
lines changed
Expand file tree Collapse file tree 1 file changed +0
-47
lines changed Original file line number Diff line number Diff line change 99
1010final readonly class Utils
1111{
12- // $blueprint = [
13- // 'type' => 'string',
14- // 'payload' => [
15- // 'error' => 'string',
16- // ],
17- // ];
18- //
19- // $blueprint = [
20- // 'type' => 'string',
21- // 'payload' => [
22- // 'specversion' => 'string',
23- // 'id' => 'string',
24- // 'time' => 'string',
25- // 'source' => 'string',
26- // 'subject' => 'string',
27- // 'type' => 'string',
28- // 'datacontenttype' => 'string',
29- // 'data' => 'array',
30- // 'hash' => 'string',
31- // 'predecessorhash' => 'string',
32- // ],
33- // ];
34- // public static function hasShapeOf(array $data, array $blueprint): bool
35- // {
36- // foreach ($blueprint as $key => $type) {
37- // if (!array_key_exists($key, $data)) {
38- // return false;
39- // }
40- //
41- // if (is_array($type)) {
42- // if (!is_array($data[$key])) {
43- // return false;
44- // }
45- //
46- // if (!self::hasShapeOf($data[$key], $type)) {
47- // return false;
48- // }
49- // } else {
50- // if (gettype($data[$key]) !== $type) {
51- // return false;
52- // }
53- // }
54- // }
55- //
56- // return true;
57- // }
58-
5912 public static function readLine (StreamInterface $ stream ): string
6013 {
6114 $ buffer = '' ;
You can’t perform that action at this time.
0 commit comments