You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/PHPStan/Parser/PhpDocParserTest.php
+38-11Lines changed: 38 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1038,7 +1038,10 @@ public function provideDeprecatedTagsData(): \Iterator
1038
1038
newPhpDocNode([
1039
1039
newPhpDocTagNode(
1040
1040
'@deprecated',
1041
-
newDeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In Drupal 9 there will be no way to set the status and in Drupal 8 this ability has been removed because mb_*() functions are supplied using Symfony\'s polyfill.')
1041
+
newDeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In
1042
+
Drupal 9 there will be no way to set the status and in Drupal 8 this
1043
+
ability has been removed because mb_*() functions are supplied using
1044
+
Symfony\'s polyfill.')
1042
1045
),
1043
1046
]),
1044
1047
];
@@ -1064,7 +1067,10 @@ public function provideDeprecatedTagsData(): \Iterator
1064
1067
newPhpDocTextNode(''),
1065
1068
newPhpDocTagNode(
1066
1069
'@deprecated',
1067
-
newDeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In Drupal 9 there will be no way to set the status and in Drupal 8 this ability has been removed because mb_*() functions are supplied using Symfony\'s polyfill.')
1070
+
newDeprecatedTagValueNode('in Drupal 8.6.0 and will be removed before Drupal 9.0.0. In
1071
+
Drupal 9 there will be no way to set the status and in Drupal 8 this
1072
+
ability has been removed because mb_*() functions are supplied using
1073
+
Symfony\'s polyfill.')
1068
1074
),
1069
1075
]),
1070
1076
];
@@ -1577,7 +1583,8 @@ public function provideMultiLinePhpDocData(): array
1577
1583
newIdentifierTypeNode('Foo'),
1578
1584
false,
1579
1585
'$foo',
1580
-
'1st multi world description some text in the middle'
1586
+
'1st multi world description
1587
+
some text in the middle'
1581
1588
)
1582
1589
),
1583
1590
newPhpDocTagNode(
@@ -2301,7 +2308,11 @@ public function provideRealWorldExampleData(): \Iterator
2301
2308
'OK with two param and paragraph description',
2302
2309
$sample,
2303
2310
newPhpDocNode([
2304
-
newPhpDocTextNode('Returns the schema for the field. This method is static because the field schema information is needed on creation of the field. FieldItemInterface objects instantiated at that time are not reliable as field settings might be missing. Computed fields having no schema should return an empty array.'),
2311
+
newPhpDocTextNode('Returns the schema for the field.
2312
+
This method is static because the field schema information is needed on
2313
+
creation of the field. FieldItemInterface objects instantiated at that
2314
+
time are not reliable as field settings might be missing.
2315
+
Computed fields having no schema should return an empty array.'),
2305
2316
// @todo the commented out items should be correct.
2306
2317
//new PhpDocTextNode('Returns the schema for the field.'),
2307
2318
newPhpDocTextNode(''),
@@ -2317,7 +2328,6 @@ public function provideRealWorldExampleData(): \Iterator
2317
2328
''
2318
2329
)
2319
2330
),
2320
-
// @todo this should be the param description, but new line param descriptions are not handled.
2321
2331
newPhpDocTextNode('The field definition.'),
2322
2332
newPhpDocTextNode(''),
2323
2333
newPhpDocTagNode(
@@ -2327,12 +2337,29 @@ public function provideRealWorldExampleData(): \Iterator
2327
2337
''
2328
2338
)
2329
2339
),
2330
-
// @todo these are actually the @return description.
2331
-
newPhpDocTextNode('An empty array if there is no schema, or an associative array with the following key/value pairs:'),
2332
-
newPhpDocTextNode('- columns: An array of Schema API column specifications, keyed by column name. The columns need to be a subset of the properties defined in propertyDefinitions(). The \'not null\' property is ignored if present, as it is determined automatically by the storage controller depending on the table layout and the property definitions. It is recommended to avoid having the column definitions depend on field settings when possible. No assumptions should be made on how storage engines internally use the original column name to structure their storage.'),
2333
-
newPhpDocTextNode('- unique keys: (optional) An array of Schema API unique key definitions. Only columns that appear in the \'columns\' array are allowed.'),
2334
-
newPhpDocTextNode('- indexes: (optional) An array of Schema API index definitions. Only columns that appear in the \'columns\' array are allowed. Those indexes will be used as default indexes. Field definitions can specify additional indexes or, at their own risk, modify the default indexes specified by the field-type module. Some storage engines might not support indexes.'),
2335
-
newPhpDocTextNode('- foreign keys: (optional) An array of Schema API foreign key definitions. Note, however, that the field data is not necessarily stored in SQL. Also, the possible usage is limited, as you cannot specify another field as related, only existing SQL tables, such as {taxonomy_term_data}.'),
2340
+
newPhpDocTextNode('An empty array if there is no schema, or an associative array with the
2341
+
following key/value pairs:'),
2342
+
newPhpDocTextNode('- columns: An array of Schema API column specifications, keyed by column
2343
+
name. The columns need to be a subset of the properties defined in
2344
+
propertyDefinitions(). The \'not null\' property is ignored if present,
2345
+
as it is determined automatically by the storage controller depending
2346
+
on the table layout and the property definitions. It is recommended to
2347
+
avoid having the column definitions depend on field settings when
2348
+
possible. No assumptions should be made on how storage engines
2349
+
internally use the original column name to structure their storage.'),
2350
+
newPhpDocTextNode('- unique keys: (optional) An array of Schema API unique key definitions.
2351
+
Only columns that appear in the \'columns\' array are allowed.'),
2352
+
newPhpDocTextNode('- indexes: (optional) An array of Schema API index definitions. Only
2353
+
columns that appear in the \'columns\' array are allowed. Those indexes
2354
+
will be used as default indexes. Field definitions can specify
2355
+
additional indexes or, at their own risk, modify the default indexes
2356
+
specified by the field-type module. Some storage engines might not
2357
+
support indexes.'),
2358
+
newPhpDocTextNode('- foreign keys: (optional) An array of Schema API foreign key
2359
+
definitions. Note, however, that the field data is not necessarily
2360
+
stored in SQL. Also, the possible usage is limited, as you cannot
2361
+
specify another field as related, only existing SQL tables,
0 commit comments