Showing 447 of 447 total issues
Avoid variables with short names like $id. Configured minimum length is 3. Open
Open
$id = $entity->getId();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
Open
$id = $entity->getId();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
Open
protected $id;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
Open
$id = $entity->getId();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
Open
$id = $entity->getId();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
Open
$id = $entity->getId();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
Open
protected $id;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The class OrmTestCase has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13. Open
Open
abstract class OrmTestCase extends \PHPUnit_Framework_TestCase
{
const GEOMETRY_ENTITY = 'CrEOF\Spatial\Tests\Fixtures\GeometryEntity';
const NO_HINT_GEOMETRY_ENTITY = 'CrEOF\Spatial\Tests\Fixtures\NoHintGeometryEntity';
const POINT_ENTITY = 'CrEOF\Spatial\Tests\Fixtures\PointEntity';
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
There must be one blank line after the last USE statement; 0 found; Open
Open
use CrEOF\Spatial\ORM\Query\AST\Functions\AbstractSpatialDQLFunction;
- Create a ticketCreate a ticket
- Exclude checks
There must be one blank line after the last USE statement; 0 found; Open
Open
use CrEOF\Spatial\ORM\Query\AST\Functions\AbstractSpatialDQLFunction;
- Create a ticketCreate a ticket
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class STOverlaps extends AbstractSpatialDQLFunction {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class STBuffer extends AbstractSpatialDQLFunction {
- Create a ticketCreate a ticket
- Exclude checks
There must be one blank line after the last USE statement; 0 found; Open
Open
use CrEOF\Spatial\PHP\Types\Geometry\MultiLineString;
- Create a ticketCreate a ticket
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class Distance extends AbstractSpatialDQLFunction {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class STWithin extends AbstractSpatialDQLFunction {
- Create a ticketCreate a ticket
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks