lib/CrEOF/Spatial/PHP/Types/AbstractGeometry.php
Avoid using undefined variables such as '$json' which will lead to PHP notices. Open
Open
$json['coordinates'] = $this->toArray();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$json' which will lead to PHP notices. Open
Open
$json['type'] = $this->getType();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$json' which will lead to PHP notices. Open
Open
return json_encode($json);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid unused private methods such as 'toStringMultiPolygon'. Open
Open
private function toStringMultiPolygon(array $multiPolygon)
{
$strings = null;
foreach ($multiPolygon as $polygon) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Line exceeds 120 characters; contains 175 characters Open
Open
throw new InvalidValueException(sprintf('Invalid %s LineString value of type "%s"', $this->getType(), (is_object($ring) ? get_class($ring) : gettype($ring))));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 173 characters Open
Open
throw new InvalidValueException(sprintf('Invalid %s Point value of type "%s"', $this->getType(), (is_object($point) ? get_class($point) : gettype($point))));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
throw new InvalidValueException(sprintf('Invalid polygon, ring "(%s)" is not closed', $this->toStringLineString($ring)));
- Create a ticketCreate a ticket
- Exclude checks