Skip to content

Commit 440af70

Browse files
authored
Merge pull request #153 from PHPCSStandards/docs/phpdoc-rendering-improvements
Docs: improvements for better rendering in PHPDocumentor
2 parents 4d72ca7 + 95df9ca commit 440af70

26 files changed

+554
-516
lines changed

PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ abstract class AbstractArrayDeclarationSniff implements Sniff
6868
* A multi-dimentional array with information on each array item.
6969
*
7070
* The array index is 1-based and contains the following information on each array item:
71-
* - 'start' : The stack pointer to the first token in the array item.
72-
* - 'end' : The stack pointer to the last token in the array item.
73-
* - 'raw' : A string with the contents of all tokens between `start` and `end`.
74-
* - 'clean' : Same as `raw`, but all comment tokens have been stripped out.
71+
* ```php
72+
* 1 => array(
73+
* 'start' => int, // The stack pointer to the first token in the array item.
74+
* 'end' => int, // The stack pointer to the last token in the array item.
75+
* 'raw' => string, // A string with the contents of all tokens between `start` and `end`.
76+
* 'clean' => string, // Same as `raw`, but all comment tokens have been stripped out.
77+
* )
78+
* ```
7579
*
7680
* @since 1.0.0
7781
*
@@ -163,7 +167,7 @@ public function register()
163167
* Processes this test when one of its tokens is encountered.
164168
*
165169
* This method fills the properties with relevant information for examining the array
166-
* and then passes off to the `processArray()` method.
170+
* and then passes off to the {@see AbstractArrayDeclarationSniff::processArray()} method.
167171
*
168172
* @since 1.0.0
169173
*
@@ -290,9 +294,9 @@ public function processArray(File $phpcsFile)
290294
* @param int $openPtr The position of the array opener token in the token stack.
291295
* @param int $closePtr The position of the array closer token in the token stack.
292296
*
293-
* @return true|void Returning `true` will short-circuit the sniff and stop processing.
297+
* @return true|void Returning `TRUE` will short-circuit the sniff and stop processing.
294298
* In effect, this means that the sniff will not examine the individual
295-
* array items if `true` is returned.
299+
* array items if `TRUE` is returned.
296300
*/
297301
public function processOpenClose(File $phpcsFile, $openPtr, $closePtr)
298302
{
@@ -321,7 +325,7 @@ public function processOpenClose(File $phpcsFile, $openPtr, $closePtr)
321325
* @param int $itemNr Which item in the array is being handled.
322326
* 1-based, i.e. the first item is item 1, the second 2 etc.
323327
*
324-
* @return true|void Returning `true` will short-circuit the array item loop and stop processing.
328+
* @return true|void Returning `TRUE` will short-circuit the array item loop and stop processing.
325329
* In effect, this means that the sniff will not examine the double arrow, the array
326330
* value or comma for this array item and will not process any array items after this one.
327331
*/
@@ -351,7 +355,7 @@ public function processKey(File $phpcsFile, $startPtr, $endPtr, $itemNr)
351355
* @param int $itemNr Which item in the array is being handled.
352356
* 1-based, i.e. the first item is item 1, the second 2 etc.
353357
*
354-
* @return true|void Returning `true` will short-circuit the array item loop and stop processing.
358+
* @return true|void Returning `TRUE` will short-circuit the array item loop and stop processing.
355359
* In effect, this means that the sniff will not examine the array value or
356360
* comma for this array item and will not process any array items after this one.
357361
*/
@@ -374,7 +378,7 @@ public function processNoKey(File $phpcsFile, $startPtr, $itemNr)
374378
* @param int $itemNr Which item in the array is being handled.
375379
* 1-based, i.e. the first item is item 1, the second 2 etc.
376380
*
377-
* @return true|void Returning `true` will short-circuit the array item loop and stop processing.
381+
* @return true|void Returning `TRUE` will short-circuit the array item loop and stop processing.
378382
* In effect, this means that the sniff will not examine the array value or
379383
* comma for this array item and will not process any array items after this one.
380384
*/
@@ -403,7 +407,7 @@ public function processArrow(File $phpcsFile, $arrowPtr, $itemNr)
403407
* @param int $itemNr Which item in the array is being handled.
404408
* 1-based, i.e. the first item is item 1, the second 2 etc.
405409
*
406-
* @return true|void Returning `true` will short-circuit the array item loop and stop processing.
410+
* @return true|void Returning `TRUE` will short-circuit the array item loop and stop processing.
407411
* In effect, this means that the sniff will not examine the comma for this
408412
* array item and will not process any array items after this one.
409413
*/
@@ -426,7 +430,7 @@ public function processValue(File $phpcsFile, $startPtr, $endPtr, $itemNr)
426430
* @param int $itemNr Which item in the array is being handled.
427431
* 1-based, i.e. the first item is item 1, the second 2 etc.
428432
*
429-
* @return true|void Returning `true` will short-circuit the array item loop and stop processing.
433+
* @return true|void Returning `TRUE` will short-circuit the array item loop and stop processing.
430434
* In effect, this means that the sniff will not process any array items
431435
* after this one.
432436
*/

0 commit comments

Comments
 (0)