Skip to content

Commit 0d7557f

Browse files
committed
rewording / restyling
1 parent fb6267e commit 0d7557f

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

proposed/phpdoc.md

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -243,30 +243,25 @@ Common uses for the Description:
243243

244244
### 5.3. Tags
245245

246-
Tags provide a way for authors to supply concise meta-data regarding the
247-
succeeding "Structural Element". Each tag starts on a new line, followed
248-
by an at-sign (@) and a tag-name, followed by white-space and meta-data
249-
(including a description).
246+
Tags supply concise metadata for a "Structural Element". Each tag starts on a
247+
new line, followed by an at-sign (`@`) and a tag-name, followed by whitespace and
248+
metadata (including a description).
250249

251-
If meta-data is provided, it MAY span multiple lines and COULD follow a
252-
strict format, and as such provide parameters, as dictated by the type of tag.
253-
The type of the tag can be derived from its name.
254-
255-
For example:
250+
If metadata is provided, it MAY span multiple lines and COULD follow a strict
251+
format, as dictated by the specific tag.
256252

257253
> `@param string $argument1 This is a parameter.`
258254
>
259-
> The above tag consists of a name ('param') and meta-data
260-
> ('string $argument1 This is a parameter.') where the meta-data is split into a
261-
> "Type" ('string'), variable name ('$argument') and description
262-
> ('This is a parameter.').
263-
264-
The description of a tag MUST support Markdown as a formatting language. Due to
265-
the nature of Markdown, it is legal to start the description of the tag on the
266-
same or the subsequent line and interpret it in the same way.
255+
> The above tag consists of a _name_ (`param`) and metadata
256+
> ('string $argument1 This is a parameter.'), where the metadata is split into a
257+
> _type_ (`string`), variable name (`$argument1`), and description (`This is a
258+
> parameter.`).
267259
268-
Thus, the following tags are semantically identical:
260+
The description MUST support Markdown as a formatting language. The
261+
description of the tag MAY start on the same line or next line. The following
262+
tags are semantically identical:
269263

264+
```php
270265
/**
271266
* @var string This is a description.
272267
* @var string This is a
@@ -294,7 +289,7 @@ A complete example could look like this:
294289
* This is a Summary.
295290
*
296291
* This is a Description. It may span multiple lines
297-
* or contain 'code' examples using the _Markdown_ markup
292+
* or contain `code` examples using the _Markdown_ markup
298293
* language.
299294
*
300295
* @see Markdown
@@ -312,7 +307,7 @@ function test($parameter1, $e)
312307
}
313308
```
314309

315-
It is also allowed to omit the Description:
310+
The Description MAY be omitted:
316311

317312
```php
318313
/**
@@ -332,8 +327,7 @@ function test($parameter1, $parameter2)
332327
}
333328
```
334329

335-
Or even omit the tags section as well (though it is not encouraged,
336-
as you are missing information on the parameters and return value):
330+
Tags MAY also be omitted:
337331

338332
```php
339333
/**

0 commit comments

Comments
 (0)