File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
test/resources/SiteKitResourceChannelFactory
documentRootLayout/WEB-IES Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 8
8
9
9
/**
10
10
* @phpstan-type ContextPhp array{
11
+ * tenant: array{
12
+ * id: string,
13
+ * name: string,
14
+ * anchor: string,
15
+ * attributes: array<string, mixed>
16
+ * },
11
17
* publisher: array{
12
18
* id: int,
13
19
* name: string,
17
23
* nature: ?string,
18
24
* locale: ?string,
19
25
* encoding: ?string,
20
- * translationLocales: ?string[]
26
+ * translationLocales: ?string[],
21
27
* }
22
28
* }
23
29
*/
@@ -64,10 +70,19 @@ public function create(): ResourceChannel
64
70
$ this ->configDir ,
65
71
$ searchIndex ,
66
72
$ data ['publisher ' ]['translationLocales ' ] ?? [],
67
- $ this ->createTenant ($ data ['tanent ' ] ?? $ data [ ' client ' ] /* deprecated */ ?? [ ]),
73
+ $ this ->createTenant ($ data ['tenant ' ]),
68
74
);
69
75
}
70
76
77
+ /**
78
+ * @param array{
79
+ * id: string,
80
+ * name: string,
81
+ * anchor: string,
82
+ * attributes: array<string, mixed>,
83
+ * } $data
84
+ * @return ResourceTenant
85
+ */
71
86
private function createTenant (array $ data ): ResourceTenant
72
87
{
73
88
return new ResourceTenant (
@@ -90,6 +105,11 @@ private function loadContextPhpFile(): array
90
105
);
91
106
}
92
107
108
+ if (isset ($ context ['client ' ])) {
109
+ $ context ['tenant ' ] = $ context ['client ' ];
110
+ unset($ context ['client ' ]);
111
+ }
112
+
93
113
/** @var ContextPhp $context */
94
114
return $ context ;
95
115
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
return [
4
- 'tanent ' => [
4
+ 'client ' => [
5
5
'id ' => '2 ' ,
6
6
'name ' => 'Test-Tanent ' ,
7
7
'anchor ' => 'test-tanent ' ,
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
return [
4
- 'tanent ' => [
4
+ 'tenant ' => [
5
5
'id ' => '2 ' ,
6
6
'name ' => 'Test-Tanent ' ,
7
7
'anchor ' => 'test-tanent ' ,
You can’t perform that action at this time.
0 commit comments