Both the $myVar assignment in line 1 and the $higher assignment in line 2
are dead. The first because $myVar is never used and the second because
$higher is always overwritten for every possible time line.
Both the $myVar assignment in line 1 and the $higher assignment in line 2
are dead. The first because $myVar is never used and the second because
$higher is always overwritten for every possible time line.
The function test() has been defined more than once; this definition is ignored, only the first definition in this file (L12-20) is considered.
This check looks for functions that have already been defined in the same file.
Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the @ignore annotation.
The type MyClass has been defined more than once; this definition is ignored, only the first definition in this file (L70-79) is considered.
This check looks for classes that have been defined more than once in the same file.
If you can, we would recommend to use standard object-oriented programming
techniques. For example, to avoid multiple types, it might make sense to create a
common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion,
static analysis and also better OPCode caching from PHP.
The type SomeClass has been defined more than once; this definition is ignored, only the first definition in CodingStandard/Tests/Cla...DeclarationUnitTest.inc (L3-7) is considered.
This check looks for classes that have been defined more than once.
If you can, we would recommend to use standard object-oriented programming
techniques. For example, to avoid multiple types, it might make sense to create a
common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion,
static analysis and also better OPCode caching from PHP.
It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
Both the $myVar assignment in line 1 and the $higher assignment in line 2
are dead. The first because $myVar is never used and the second because
$higher is always overwritten for every possible time line.
Both the $myVar assignment in line 1 and the $higher assignment in line 2
are dead. The first because $myVar is never used and the second because
$higher is always overwritten for every possible time line.
It is not recommended to use PHP's closing tag ?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended
as you might accidentally add whitespace after the closing tag which would then
be output by PHP. This can cause severe problems, for example headers cannot be
sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and
it also has no negative effects whatsoever.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.