Showing 447 of 447 total issues
Method testEnvelopeWhereParameter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testEnvelopeWhereParameter()
{
$entity1 = new PolygonEntity();
$rings1 = array(
new LineString(array(
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function testPointGeometry()
{
$entity = new GeometryEntity();
$entity->setGeometry(new Point(1, 1));
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 111.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function testPointGeography()
{
$entity = new GeographyEntity();
$entity->setGeography(new Point(1, 1));
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 111.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method testSelectEnvelope
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSelectEnvelope()
{
$entity1 = new PolygonEntity();
$rings1 = array(
new LineString(array(
- Create a ticketCreate a ticket
Method testSelectSTEnvelope
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSelectSTEnvelope()
{
$entity1 = new PolygonEntity();
$rings1 = array(
new LineString(array(
- Create a ticketCreate a ticket
Method testSelectSTLineCrossingDirection
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSelectSTLineCrossingDirection()
{
$lineString1 = new LineString(array(
new Point(8, 15),
new Point(4, 8)
- Create a ticketCreate a ticket
Method testMultiPolygon
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testMultiPolygon()
{
$polygons = array(
new Polygon(
array(
- Create a ticketCreate a ticket
Method testMBRContainsWhereParameter
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testMBRContainsWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testContainsWhereParameter
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testContainsWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testFindByMultiPolygon
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testFindByMultiPolygon()
{
$polygons = array(
new Polygon(
array(
- Create a ticketCreate a ticket
Method testSTCrossesWhereParameter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSTCrossesWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 10)
- Create a ticketCreate a ticket
Method testTypeWrappingSelect
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testTypeWrappingSelect()
{
$lineString = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSTContainsWhereParameter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSTContainsWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectSTCrosses
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSelectSTCrosses()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 10)
- Create a ticketCreate a ticket
Method testSelectSTMakeEnvelope
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSelectSTMakeEnvelope()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(2, 0),
- Create a ticketCreate a ticket
Method onNotSuccessfulTest
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function onNotSuccessfulTest(\Exception $e)
{
if (! $GLOBALS['opt_use_debug_stack'] || $e instanceof \PHPUnit_Framework_AssertionFailedError) {
throw $e;
}
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function setY($y)
{
$parser = new Parser($y);
try {
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 106.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function setX($x)
{
$parser = new Parser($x);
try {
- Read upRead up
- Create a ticketCreate a ticket
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 106.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method testSTLineCrossingDirectionWhereParameter
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSTLineCrossingDirectionWhereParameter()
{
$lineString1 = new LineString(array(
new Point(8, 15),
new Point(4, 8)
- Create a ticketCreate a ticket
Method testSelectSTContains
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testSelectSTContains()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket