@@ -49,19 +49,27 @@ public function testArrayKeyword($testMarker, $testContent='array')
49
49
*
50
50
* @see testArrayKeyword()
51
51
*
52
- * @return array
52
+ * @return array<string, array<string, string>>
53
53
*/
54
54
public static function dataArrayKeyword ()
55
55
{
56
56
return [
57
- 'empty array ' => ['/* testEmptyArray */ ' ],
58
- 'array with space before parenthesis ' => ['/* testArrayWithSpace */ ' ],
57
+ 'empty array ' => [
58
+ 'testMarker ' => '/* testEmptyArray */ ' ,
59
+ ],
60
+ 'array with space before parenthesis ' => [
61
+ 'testMarker ' => '/* testArrayWithSpace */ ' ,
62
+ ],
59
63
'array with comment before parenthesis ' => [
60
- '/* testArrayWithComment */ ' ,
61
- 'Array ' ,
64
+ 'testMarker ' => '/* testArrayWithComment */ ' ,
65
+ 'testContent ' => 'Array ' ,
66
+ ],
67
+ 'nested: outer array ' => [
68
+ 'testMarker ' => '/* testNestingArray */ ' ,
69
+ ],
70
+ 'nested: inner array ' => [
71
+ 'testMarker ' => '/* testNestedArray */ ' ,
62
72
],
63
- 'nested: outer array ' => ['/* testNestingArray */ ' ],
64
- 'nested: inner array ' => ['/* testNestedArray */ ' ],
65
73
];
66
74
67
75
}//end dataArrayKeyword()
@@ -101,17 +109,21 @@ public function testArrayType($testMarker, $testContent='array')
101
109
*
102
110
* @see testArrayType()
103
111
*
104
- * @return array
112
+ * @return array<string, array<string, string>>
105
113
*/
106
114
public static function dataArrayType ()
107
115
{
108
116
return [
109
117
'closure return type ' => [
110
- '/* testClosureReturnType */ ' ,
111
- 'Array ' ,
118
+ 'testMarker ' => '/* testClosureReturnType */ ' ,
119
+ 'testContent ' => 'Array ' ,
120
+ ],
121
+ 'function param type ' => [
122
+ 'testMarker ' => '/* testFunctionDeclarationParamType */ ' ,
123
+ ],
124
+ 'function union return type ' => [
125
+ 'testMarker ' => '/* testFunctionDeclarationReturnType */ ' ,
112
126
],
113
- 'function param type ' => ['/* testFunctionDeclarationParamType */ ' ],
114
- 'function union return type ' => ['/* testFunctionDeclarationReturnType */ ' ],
115
127
];
116
128
117
129
}//end dataArrayType()
@@ -152,16 +164,18 @@ public function testNotArrayKeyword($testMarker, $testContent='array')
152
164
*
153
165
* @see testNotArrayKeyword()
154
166
*
155
- * @return array
167
+ * @return array<string, array<string, string>>
156
168
*/
157
169
public static function dataNotArrayKeyword ()
158
170
{
159
171
return [
160
172
'class-constant-name ' => [
161
- '/* testClassConst */ ' ,
162
- 'ARRAY ' ,
173
+ 'testMarker ' => '/* testClassConst */ ' ,
174
+ 'testContent ' => 'ARRAY ' ,
175
+ ],
176
+ 'class-method-name ' => [
177
+ 'testMarker ' => '/* testClassMethod */ ' ,
163
178
],
164
- 'class-method-name ' => ['/* testClassMethod */ ' ],
165
179
];
166
180
167
181
}//end dataNotArrayKeyword()
0 commit comments