creof/doctrine2-spatial

View on GitHub

Showing 444 of 444 total issues

Method testSelectSTSummaryGeography has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testSelectSTSummaryGeography()
    {
        $entity1 = new GeographyEntity();
        $point1  = new GeographyPoint(5, 5);

Method testSolidMultiLineStringFromArraysGetRings has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testSolidMultiLineStringFromArraysGetRings()
    {
        $expected = array(
            new LineString(
                array(

Method testEnvelopeWhereParameter has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

Method testMultiLineStringFromObjectsToArray has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testMultiLineStringFromObjectsToArray()
    {
        $expected = array(
            array(
                array(0, 0),

Method testSTEnvelopeWhereParameter has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

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

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

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 testSelectEnvelope has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

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

    public function testMultiPolygon()
    {
        $polygons = array(
            new Polygon(
                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 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 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 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 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 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

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