@@ -10,6 +10,7 @@ PSR-5: PHPDoc
10
10
- [ 5. The PHPDoc Format] ( #5-the-phpdoc-format )
11
11
- [ 5.1. Summary] ( #51-summary )
12
12
- [ 5.2. Description] ( #52-description )
13
+ - [ 5.2.1 Inline tags] ( #521-inline-tags )
13
14
- [ 5.3. Tags] ( #53-tags )
14
15
- [ 5.3.1. Tag Name] ( #531-tag-name )
15
16
- [ 5.4. Examples] ( #54-examples )
@@ -237,6 +238,33 @@ Common uses for the Description:
237
238
* To provide a set of common use cases or scenarios in which the "Structural
238
239
Element" may be applied
239
240
241
+ #### 5.2.1 Inline tags
242
+
243
+ A description MAY contain inline tags. Inline tags MUST follow the specification of
244
+ tags with the same syntax. An inline tag MUST start with ` {@ ` and MUST with ` } `
245
+
246
+ ``` php
247
+ /**
248
+ * Summary.
249
+ *
250
+ * This is a description with an inline tag {@tag rest of the tag format}
251
+ */
252
+ ```
253
+
254
+ Inline tags are only covering regular tags and SHALL NOT cover _ Annotation_ tags.
255
+
256
+ As inline tags are always closed with a ` } ` developers cannot use this char in a
257
+ description. To overcome this issue parsers MUST support escape char ` { ` followed
258
+ by ` } ` to be interpreted as a single ` } `
259
+
260
+ ``` php
261
+ /**
262
+ * Summary.
263
+ *
264
+ * This is a description with an inline tag {@tag show case {} escape of ending char}
265
+ */
266
+ ```
267
+
240
268
### 5.3. Tags
241
269
242
270
Tags supply concise metadata for a "Structural Element". Each tag starts on a
@@ -253,8 +281,8 @@ format, as dictated by the specific tag.
253
281
> _ type_ (` string ` ), variable name (` $argument1 ` ), and description (`This is a
254
282
> parameter.`).
255
283
256
- The description MUST support Markdown as a formatting language. The
257
- description of the tag MAY start on the same line or next line. The following
284
+ The description MUST support Markdown as a formatting language. The
285
+ description of the tag MAY start on the same line or next line. The following
258
286
tags are semantically identical:
259
287
260
288
``` php
0 commit comments