| 1 | <?php |
||
| 3 | class Kint_Object_Representation_Docstring extends Kint_Object_Representation |
||
|
|
|||
| 4 | { |
||
| 5 | public $file = null; |
||
| 6 | public $line = null; |
||
| 7 | public $class = null; |
||
| 8 | public $hints = array('docstring'); |
||
| 9 | |||
| 10 | public function __construct($docstring, $file, $line, $class = null) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns the representation's docstring without surrounding comments. |
||
| 22 | * |
||
| 23 | * Note that this will not work flawlessly. |
||
| 24 | * |
||
| 25 | * On comments with whitespace after the stars the lines will begin with |
||
| 26 | * whitespace, since we can't accurately guess how much of an indentation |
||
| 27 | * is required. |
||
| 28 | * |
||
| 29 | * And on lines without stars on the left this may eat bullet points. |
||
| 30 | * |
||
| 31 | * Long story short: If you want the docstring read the contents. If you |
||
| 32 | * absolutely must have it without comments (ie renderValueShort) this will |
||
| 33 | * probably do. |
||
| 34 | * |
||
| 35 | * @return string Docstring with comments stripped |
||
| 36 | */ |
||
| 37 | public function docstringWithoutComments() |
||
| 48 | } |
||
| 49 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.