The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
Loading history...
20
{
21
return Parser::TRIGGER_SUCCESS;
22
}
23
24
public function parse(&$var, BasicObject &$o, $trigger)
Avoid variables with short names like $o. Configured minimum length is 3.
Short variable names may make your code harder to understand. Variable names should
be self-descriptive. This check looks for variable names who are shorter than
a configured minimum.
Loading history...
25
{
26
if (!$o->value) {
27
return;
28
}
29
30
$trace = $this->parser->getCleanArray($var);
31
32
if (count($trace) !== count($o->value->contents) || !Utils::isTrace($trace)) {
$old_trace 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.
$old_trace 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...
46
$index = $frame->name;
47
48
if (!isset($trace[$index]['function'])) {
49
// Something's very very wrong here, but it's probably a plugin's fault
50
continue;
51
}
52
53
if (Utils::traceFrameIsListed($trace[$index], self::$blacklist)) {
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.