longitude-one/doctrine-spatial

View on GitHub
lib/LongitudeOne/Spatial/PHP/Types/AbstractGeometry.php

Summary

Maintainability
A
2 hrs
Test Coverage
A
94%

AbstractGeometry has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class AbstractGeometry implements \JsonSerializable, SpatialInterface
{
    /**
     * Spatial Reference System Identifier.
     */
Severity: Minor
Found in lib/LongitudeOne/Spatial/PHP/Types/AbstractGeometry.php - About 2 hrs to fix

    Avoid unused private methods such as 'toStringMultiPolygon'.
    Open

        private function toStringMultiPolygon(array $multiPolygon): string
        {
            $strings = null;
    
            foreach ($multiPolygon as $polygon) {

    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 141 characters
    Open

         * @param ((float|int)[][]|LineStringInterface|MultiPointInterface|PointInterface[])[] $lineStrings the array of line strings to validate

    Line exceeds 120 characters; contains 130 characters
    Open

         * @param (float|int)[][]|LineStringInterface|MultiPointInterface|PointInterface[] $ring the ring or a ring converted to array

    Line exceeds 120 characters; contains 159 characters
    Open

         * @param ((float|int)[][][]|LineStringInterface[]|MultiPointInterface[]|PointInterface[][]|PolygonInterface)[] $polygons the array of polygons to validate

    Line exceeds 120 characters; contains 122 characters
    Open

         * @param (float|int)[][]|LineStringInterface|MultiPointInterface|PointInterface[] $lineString line string to validate

    Line exceeds 120 characters; contains 130 characters
    Open

         * @return array{type: string, coordinates: array<int, mixed>, srid: ?int} data which can be serialized by <b>json_encode</b>,

    Line exceeds 120 characters; contains 130 characters
    Open

         * @param (float|int)[][]|LineStringInterface|MultiPointInterface|PointInterface[] $points array of geometric data to validate

    Line exceeds 120 characters; contains 129 characters
    Open

         *                                                                         which is a value of any type other than a resource

    Line exceeds 120 characters; contains 139 characters
    Open

         * @return ((float|int)[][][]|LineStringInterface[]|MultiPointInterface[]|PointInterface[][]|PolygonInterface)[] the validated polygons

    There are no issues that match your filters.

    Category
    Status