creof/doctrine2-spatial

View on GitHub

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(

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function testPointGeometry()
    {
        $entity = new GeometryEntity();

        $entity->setGeometry(new Point(1, 1));
Severity: Major
Found in tests/CrEOF/Spatial/Tests/DBAL/Types/GeometryTypeTest.php and 1 other location - About 1 hr to fix
tests/CrEOF/Spatial/Tests/DBAL/Types/GeographyTypeTest.php on lines 64..79

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function testPointGeography()
    {
        $entity = new GeographyEntity();

        $entity->setGeography(new Point(1, 1));
Severity: Major
Found in tests/CrEOF/Spatial/Tests/DBAL/Types/GeographyTypeTest.php and 1 other location - About 1 hr to fix
tests/CrEOF/Spatial/Tests/DBAL/Types/GeometryTypeTest.php on lines 67..82

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

Further Reading

Method testSelectEnvelope has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testSelectEnvelope()
    {
        $entity1 = new PolygonEntity();
        $rings1 = array(
            new LineString(array(

Method testSelectSTEnvelope has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testSelectSTEnvelope()
    {
        $entity1 = new PolygonEntity();
        $rings1 = array(
            new LineString(array(

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)

Method testMultiPolygon has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testMultiPolygon()
    {
        $polygons = array(
            new Polygon(
                array(

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),

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),

Method testFindByMultiPolygon has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testFindByMultiPolygon()
    {
        $polygons = array(
            new Polygon(
                array(

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)

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),
Severity: Minor
Found in tests/CrEOF/Spatial/Tests/ORM/Query/WrappingTest.php - About 1 hr to fix

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),

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)

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),

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;
        }
Severity: Minor
Found in tests/CrEOF/Spatial/Tests/OrmTestCase.php - About 1 hr to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function setY($y)
    {
        $parser = new Parser($y);

        try {
Severity: Major
Found in lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php and 1 other location - About 1 hr to fix
lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php on lines 65..78

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

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function setX($x)
    {
        $parser = new Parser($x);

        try {
Severity: Major
Found in lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php and 1 other location - About 1 hr to fix
lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php on lines 94..107

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

Further Reading

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)

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),
Severity
Category
Status
Source
Language