Kint_Object_Representation_Docstring does not seem to conform to the naming convention (^[A-Z][a-zA-Z0-9]*$).
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.
Loading history...
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)
11
{
12
parent::__construct('Docstring');
13
14
$this->file = $file;
15
$this->line = $line;
16
$this->class = $class;
17
$this->contents = $docstring;
18
}
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
This check compares the return type specified in the @return annotation of a function
or method doc comment with the types returned by the function and raises an issue if they
mismatch.
The expression $this->contents of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an
empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using empty(..) or !empty(...) instead.
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.