diff --git a/libraries/classes/Gis/GisGeometry.php b/libraries/classes/Gis/GisGeometry.php index da8be6ff24..4bc0079d72 100644 --- a/libraries/classes/Gis/GisGeometry.php +++ b/libraries/classes/Gis/GisGeometry.php @@ -227,6 +227,7 @@ abstract class GisGeometry * @param bool $linear if true, as a 1D array, else as a 2D array * * @return array scaled points + * @psalm-return ($linear is true? list : list) */ protected function extractPoints($point_set, $scale_data, $linear = false): array { @@ -249,8 +250,8 @@ abstract class GisGeometry $y = floatval($scale_data['height'] - ($y - $scale_data['y']) * $scale_data['scale']); } } else { - $x = 0; - $y = 0; + $x = 0.0; + $y = 0.0; } if (! $linear) { diff --git a/libraries/classes/Gis/GisLineString.php b/libraries/classes/Gis/GisLineString.php index 9e52db15b0..c4c68cb41e 100644 --- a/libraries/classes/Gis/GisLineString.php +++ b/libraries/classes/Gis/GisLineString.php @@ -136,12 +136,14 @@ class GisLineString extends GisGeometry $red = hexdec(mb_substr($line_color, 1, 2)); $green = hexdec(mb_substr($line_color, 3, 2)); $blue = hexdec(mb_substr($line_color, 4, 2)); - $line = [ - 'width' => 1.5, - 'color' => [ - $red, - $green, - $blue, + $lineStyle = [ + 'all' => [ + 'width' => 1.5, + 'color' => [ + $red, + $green, + $blue, + ], ], ]; @@ -149,20 +151,12 @@ class GisLineString extends GisGeometry // Trim to remove leading 'LINESTRING(' and trailing ')' $linesrting = mb_substr($spatial, 11, -1); - $points_arr = $this->extractPoints($linesrting, $scale_data); - - foreach ($points_arr as $point) { - if (isset($temp_point)) { - // draw line section - $pdf->Line($temp_point[0], $temp_point[1], $point[0], $point[1], $line); - } - - $temp_point = $point; - } + $points_arr = $this->extractPoints($linesrting, $scale_data, true); + $pdf->PolyLine($points_arr, 'S', $lineStyle); // print label if ($label !== '') { - $pdf->setXY($points_arr[1][0], $points_arr[1][1]); + $pdf->setXY($points_arr[2], $points_arr[3]); $pdf->setFontSize(5); $pdf->Cell(0, 0, $label); } diff --git a/libraries/classes/Gis/GisMultiLineString.php b/libraries/classes/Gis/GisMultiLineString.php index 5d4efcfe16..6141062185 100644 --- a/libraries/classes/Gis/GisMultiLineString.php +++ b/libraries/classes/Gis/GisMultiLineString.php @@ -153,12 +153,14 @@ class GisMultiLineString extends GisGeometry $red = hexdec(mb_substr($line_color, 1, 2)); $green = hexdec(mb_substr($line_color, 3, 2)); $blue = hexdec(mb_substr($line_color, 4, 2)); - $line = [ - 'width' => 1.5, - 'color' => [ - $red, - $green, - $blue, + $lineStyle = [ + 'all' => [ + 'width' => 1.5, + 'color' => [ + $red, + $green, + $blue, + ], ], ]; @@ -169,27 +171,18 @@ class GisMultiLineString extends GisGeometry // Separate each linestring $linestirngs = explode('),(', $multilinestirng); - $first_line = true; foreach ($linestirngs as $linestring) { - $points_arr = $this->extractPoints($linestring, $scale_data); - foreach ($points_arr as $point) { - if (isset($temp_point)) { - // draw line section - $pdf->Line($temp_point[0], $temp_point[1], $point[0], $point[1], $line); - } + $points_arr = $this->extractPoints($linestring, $scale_data, true); + $pdf->PolyLine($points_arr, 'S', $lineStyle); - $temp_point = $point; - } - - unset($temp_point); // print label - if ($label !== '' && $first_line) { - $pdf->setXY($points_arr[1][0], $points_arr[1][1]); - $pdf->setFontSize(5); - $pdf->Cell(0, 0, $label); + if ($label === '') { + continue; } - $first_line = false; + $pdf->setXY($points_arr[2], $points_arr[3]); + $pdf->setFontSize(5); + $pdf->Cell(0, 0, $label); } return $pdf; @@ -209,7 +202,7 @@ class GisMultiLineString extends GisGeometry { $line_options = [ 'data-label' => $label, - 'class' => 'linestring vector', + 'class' => 'multilinestring vector', 'fill' => 'none', 'stroke' => $line_color, 'stroke-width' => 2, diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 075747b204..815f10df7e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -17930,11 +17930,6 @@ parameters: count: 1 path: libraries/classes/Gis/GisGeometry.php - - - message: "#^Method PhpMyAdmin\\\\Gis\\\\GisGeometry\\:\\:extractPoints\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: libraries/classes/Gis/GisGeometry.php - - message: "#^Method PhpMyAdmin\\\\Gis\\\\GisGeometry\\:\\:generateParams\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -18255,16 +18250,6 @@ parameters: count: 2 path: libraries/classes/Gis/GisLineString.php - - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 8 - path: libraries/classes/Gis/GisLineString.php - - - - message: "#^Cannot access offset 1 on mixed\\.$#" - count: 8 - path: libraries/classes/Gis/GisLineString.php - - message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#" count: 4 @@ -18310,46 +18295,11 @@ parameters: count: 1 path: libraries/classes/Gis/GisLineString.php - - - message: "#^Parameter \\#1 \\$number of function round expects float, mixed given\\.$#" - count: 6 - path: libraries/classes/Gis/GisLineString.php - - message: "#^Parameter \\#1 \\$str of function mb_substr expects string, mixed given\\.$#" count: 1 path: libraries/classes/Gis/GisLineString.php - - - message: "#^Parameter \\#1 \\$x of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisLineString.php - - - - message: "#^Parameter \\#1 \\$x1 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisLineString.php - - - - message: "#^Parameter \\#2 \\$y of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisLineString.php - - - - message: "#^Parameter \\#2 \\$y1 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisLineString.php - - - - message: "#^Parameter \\#3 \\$x2 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisLineString.php - - - - message: "#^Parameter \\#4 \\$y2 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisLineString.php - - message: "#^Parameter \\#5 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:line\\(\\) expects int, int\\|false given\\.$#" count: 1 @@ -18405,16 +18355,6 @@ parameters: count: 3 path: libraries/classes/Gis/GisMultiLineString.php - - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 8 - path: libraries/classes/Gis/GisMultiLineString.php - - - - message: "#^Cannot access offset 1 on mixed\\.$#" - count: 8 - path: libraries/classes/Gis/GisMultiLineString.php - - message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#" count: 11 @@ -18465,46 +18405,11 @@ parameters: count: 1 path: libraries/classes/Gis/GisMultiLineString.php - - - message: "#^Parameter \\#1 \\$number of function round expects float, mixed given\\.$#" - count: 6 - path: libraries/classes/Gis/GisMultiLineString.php - - message: "#^Parameter \\#1 \\$str of function mb_substr expects string, mixed given\\.$#" count: 1 path: libraries/classes/Gis/GisMultiLineString.php - - - message: "#^Parameter \\#1 \\$x of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiLineString.php - - - - message: "#^Parameter \\#1 \\$x1 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiLineString.php - - - - message: "#^Parameter \\#2 \\$y of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiLineString.php - - - - message: "#^Parameter \\#2 \\$y1 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiLineString.php - - - - message: "#^Parameter \\#3 \\$x2 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiLineString.php - - - - message: "#^Parameter \\#4 \\$y2 of method TCPDF\\:\\:Line\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiLineString.php - - message: "#^Parameter \\#5 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:line\\(\\) expects int, int\\|false given\\.$#" count: 1 @@ -18547,12 +18452,12 @@ parameters: - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 8 + count: 1 path: libraries/classes/Gis/GisMultiPoint.php - message: "#^Cannot access offset 1 on mixed\\.$#" - count: 8 + count: 1 path: libraries/classes/Gis/GisMultiPoint.php - @@ -18561,12 +18466,12 @@ parameters: path: libraries/classes/Gis/GisMultiPoint.php - - message: "#^Cannot cast mixed to float\\.$#" + message: "#^Cannot cast mixed to string\\.$#" count: 2 path: libraries/classes/Gis/GisMultiPoint.php - - message: "#^Cannot cast mixed to string\\.$#" + message: "#^Casting to float something that's already float\\.$#" count: 2 path: libraries/classes/Gis/GisMultiPoint.php @@ -18615,11 +18520,6 @@ parameters: count: 1 path: libraries/classes/Gis/GisMultiPoint.php - - - message: "#^Parameter \\#1 \\$number of function round expects float, mixed given\\.$#" - count: 4 - path: libraries/classes/Gis/GisMultiPoint.php - - message: "#^Parameter \\#1 \\$point of method PhpMyAdmin\\\\Gis\\\\GisGeometry\\:\\:getPointForOpenLayers\\(\\) expects array, mixed given\\.$#" count: 1 @@ -18630,26 +18530,6 @@ parameters: count: 1 path: libraries/classes/Gis/GisMultiPoint.php - - - message: "#^Parameter \\#1 \\$x of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiPoint.php - - - - message: "#^Parameter \\#1 \\$x0 of method TCPDF\\:\\:Circle\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiPoint.php - - - - message: "#^Parameter \\#2 \\$y of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiPoint.php - - - - message: "#^Parameter \\#2 \\$y0 of method TCPDF\\:\\:Circle\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiPoint.php - - message: "#^Parameter \\#5 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:string\\(\\) expects int, int\\|false given\\.$#" count: 1 @@ -18732,12 +18612,7 @@ parameters: - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 7 - path: libraries/classes/Gis/GisMultiPolygon.php - - - - message: "#^Cannot access offset 1 on mixed\\.$#" - count: 4 + count: 3 path: libraries/classes/Gis/GisMultiPolygon.php - @@ -18800,11 +18675,6 @@ parameters: count: 1 path: libraries/classes/Gis/GisMultiPolygon.php - - - message: "#^Parameter \\#1 \\$number of function round expects float, mixed given\\.$#" - count: 2 - path: libraries/classes/Gis/GisMultiPolygon.php - - message: "#^Parameter \\#1 \\$point of static method PhpMyAdmin\\\\Gis\\\\GisPolygon\\:\\:isPointInsidePolygon\\(\\) expects array, mixed given\\.$#" count: 1 @@ -18825,11 +18695,6 @@ parameters: count: 1 path: libraries/classes/Gis/GisMultiPolygon.php - - - message: "#^Parameter \\#1 \\$x of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiPolygon.php - - message: "#^Parameter \\#2 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:filledPolygon\\(\\) expects int, int\\|false given\\.$#" count: 1 @@ -18840,11 +18705,6 @@ parameters: count: 1 path: libraries/classes/Gis/GisMultiPolygon.php - - - message: "#^Parameter \\#2 \\$y of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisMultiPolygon.php - - message: "#^Parameter \\#5 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:string\\(\\) expects int, int\\|false given\\.$#" count: 1 @@ -18876,22 +18736,12 @@ parameters: path: libraries/classes/Gis/GisPoint.php - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 6 - path: libraries/classes/Gis/GisPoint.php - - - - message: "#^Cannot access offset 1 on mixed\\.$#" - count: 6 - path: libraries/classes/Gis/GisPoint.php - - - - message: "#^Cannot cast mixed to float\\.$#" + message: "#^Cannot cast mixed to string\\.$#" count: 2 path: libraries/classes/Gis/GisPoint.php - - message: "#^Cannot cast mixed to string\\.$#" + message: "#^Casting to float something that's already float\\.$#" count: 2 path: libraries/classes/Gis/GisPoint.php @@ -18935,41 +18785,11 @@ parameters: count: 1 path: libraries/classes/Gis/GisPoint.php - - - message: "#^Parameter \\#1 \\$number of function round expects float, mixed given\\.$#" - count: 4 - path: libraries/classes/Gis/GisPoint.php - - - - message: "#^Parameter \\#1 \\$point of method PhpMyAdmin\\\\Gis\\\\GisGeometry\\:\\:getPointForOpenLayers\\(\\) expects array, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisPoint.php - - message: "#^Parameter \\#1 \\$str of function mb_substr expects string, mixed given\\.$#" count: 1 path: libraries/classes/Gis/GisPoint.php - - - message: "#^Parameter \\#1 \\$x of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisPoint.php - - - - message: "#^Parameter \\#1 \\$x0 of method TCPDF\\:\\:Circle\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisPoint.php - - - - message: "#^Parameter \\#2 \\$y of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisPoint.php - - - - message: "#^Parameter \\#2 \\$y0 of method TCPDF\\:\\:Circle\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisPoint.php - - message: "#^Parameter \\#5 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:string\\(\\) expects int, int\\|false given\\.$#" count: 1 @@ -19015,16 +18835,6 @@ parameters: count: 21 path: libraries/classes/Gis/GisPolygon.php - - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 3 - path: libraries/classes/Gis/GisPolygon.php - - - - message: "#^Cannot access offset 1 on mixed\\.$#" - count: 3 - path: libraries/classes/Gis/GisPolygon.php - - message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#" count: 10 @@ -19105,31 +18915,16 @@ parameters: count: 1 path: libraries/classes/Gis/GisPolygon.php - - - message: "#^Parameter \\#1 \\$number of function round expects float, mixed given\\.$#" - count: 2 - path: libraries/classes/Gis/GisPolygon.php - - message: "#^Parameter \\#1 \\$str of function mb_substr expects string, mixed given\\.$#" count: 1 path: libraries/classes/Gis/GisPolygon.php - - - message: "#^Parameter \\#1 \\$x of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisPolygon.php - - message: "#^Parameter \\#2 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:filledPolygon\\(\\) expects int, int\\|false given\\.$#" count: 1 path: libraries/classes/Gis/GisPolygon.php - - - message: "#^Parameter \\#2 \\$y of method TCPDF\\:\\:setXY\\(\\) expects float, mixed given\\.$#" - count: 1 - path: libraries/classes/Gis/GisPolygon.php - - message: "#^Parameter \\#5 \\$color of method PhpMyAdmin\\\\Image\\\\ImageWrapper\\:\\:string\\(\\) expects int, int\\|false given\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 3498b96957..305c391c25 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -6811,38 +6811,14 @@ - - $point[0] - $point[0] - $point[1] - $point[1] - $points_arr[1][0] - $points_arr[1][0] - $points_arr[1][1] - $points_arr[1][1] + $temp_point[0] - $temp_point[0] - $temp_point[1] $temp_point[1] $wkt - + $gis_data[$index]['LINESTRING']['no_of_points'] - $point[0] - $point[0] - $point[0] - $point[1] - $point[1] - $point[1] - $points_arr[$i][0] - $points_arr[$i][1] - $points_arr[1][0] - $points_arr[1][0] - $points_arr[1][1] - $points_arr[1][1] $temp_point[0] - $temp_point[0] - $temp_point[1] $temp_point[1] @@ -6850,22 +6826,12 @@ $params[$index]['LINESTRING'] $params[$index]['LINESTRING'] - + $no_of_points - $params[$index]['LINESTRING'][$i]['x'] - $params[$index]['LINESTRING'][$i]['y'] $params['srid'] - $point - $point - $point - $temp_point - $temp_point $wkt - - $point[0] - $point[1] - + $line_color $line_color @@ -6881,42 +6847,18 @@ - - $point[0] - $point[0] - $point[1] - $point[1] - $points_arr[1][0] - $points_arr[1][0] - $points_arr[1][1] - $points_arr[1][1] + $temp_point[0] - $temp_point[0] - $temp_point[1] $temp_point[1] $wkt - + $data_row[$i] $data_row['no_of_lines'] $point['x'] $point['y'] - $point[0] - $point[0] - $point[0] - $point[1] - $point[1] - $point[1] - $points_arr[$i][0] - $points_arr[$i][1] - $points_arr[1][0] - $points_arr[1][0] - $points_arr[1][1] - $points_arr[1][1] $row_data['parts'][$i] $temp_point[0] - $temp_point[0] - $temp_point[1] $temp_point[1] @@ -6925,26 +6867,17 @@ $params[$index]['MULTILINESTRING'] $params[$index]['MULTILINESTRING'] - + $data_row $no_of_lines $no_of_points - $params[$index]['MULTILINESTRING'][$j][$i]['x'] - $params[$index]['MULTILINESTRING'][$j][$i]['y'] $params['srid'] $point - $point - $point - $point - $temp_point - $temp_point $wkt - + $point['x'] $point['y'] - $point[0] - $point[1] $line_color @@ -6965,40 +6898,14 @@ - + $point - $point[0] - $point[0] - $point[1] - $point[1] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][1] - $points_arr[0][1] $wkt - + $gis_data[$index]['MULTIPOINT']['no_of_points'] $point[0] - $point[0] - $point[0] - $point[0] - $point[0] - $point[0] - $point[0] $point[1] - $point[1] - $point[1] - $point[1] - $point[1] - $point[1] - $point[1] - $points_arr[$i][0] - $points_arr[$i][1] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][1] - $points_arr[0][1] $row_data['points'][$i] $row_data['points'][$i] @@ -7007,20 +6914,13 @@ $params[$index]['MULTIPOINT'] $params[$index]['MULTIPOINT'] - + $no_of_points - $params[$index]['MULTIPOINT'][$i]['x'] - $params[$index]['MULTIPOINT'][$i]['y'] $params['srid'] $point - $point - $point - $point $wkt - - $point[0] - $point[1] + $row_data['points'][$i]['x'] $row_data['points'][$i]['y'] @@ -7034,6 +6934,10 @@ $black $color + + (float) $point[0] + (float) $point[1] + isset(self::$instance) @@ -7050,7 +6954,7 @@ $ring['points'] $wkt - + $data_row[$k] $data_row[$k] $data_row['no_of_polygons'] @@ -7069,14 +6973,6 @@ $params[$index]['MULTIPOLYGON'] $point['x'] $point['y'] - $point[0] - $point[1] - $points_arr[$i][0] - $points_arr[$i][0] - $points_arr[$i][1] - $points_arr[$i][1] - $points_arr[0][0] - $points_arr[0][1] $ring1['isOuter'] $ring1['pointOnSurface'] $ring2['isOuter'] @@ -7111,7 +7007,7 @@ $row_data['parts'][$k] $row_data['parts'][$k] - + $data_row $i $i @@ -7123,13 +7019,8 @@ $no_of_points $no_of_polygons $param_row - $param_row[$k][$j][$i]['x'] - $param_row[$k][$j][$i]['y'] - $param_row[$k][0][$i]['x'] - $param_row[$k][0][$i]['y'] $params['srid'] $point - $point $ring $ring $ring @@ -7138,15 +7029,11 @@ $row_data['parts'][$k]['inner'][] $wkt - + $innerPoint['x'] $innerPoint['y'] $point['x'] $point['y'] - $point[0] - $point[1] - $points_arr[0][0] - $points_arr[0][1] $fill_color @@ -7168,49 +7055,24 @@ - - $points_arr[0] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][1] - $points_arr[0][1] - $points_arr[0][1] - $points_arr[0][1] + $wkt - + $gis_data[$index]['POINT']['x'] $gis_data[$index]['POINT']['x'] $gis_data[$index]['POINT']['y'] $gis_data[$index]['POINT']['y'] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][0] - $points_arr[0][1] - $points_arr[0][1] - $points_arr[0][1] - $points_arr[0][1] - $points_arr[0][1] - $points_arr[0][1] $params[$index]['POINT'] $params[$index]['POINT'] - - $params[$index]['POINT']['x'] - $params[$index]['POINT']['y'] + $params['srid'] $wkt - - $points_arr[0][0] - $points_arr[0][1] + $row_data['x'] ?? '' $row_data['y'] ?? '' @@ -7224,20 +7086,20 @@ $black $color + + (float) $points_arr[0][0] + (float) $points_arr[0][1] + isset(self::$instance) - - $points_arr[2] - $points_arr[2] - $points_arr[3] - $points_arr[3] + $wkt ($y1 - $y0) ** 2 + ($x0 - $x1) ** 2 - + $gis_data[$index]['POLYGON'] $gis_data[$index]['POLYGON']['no_of_lines'] $p1['x'] @@ -7256,12 +7118,6 @@ $p2['y'] $p2['y'] $p2['y'] - $point[0] - $point[1] - $points_arr[$i][0] - $points_arr[$i][1] - $points_arr[0][0] - $points_arr[0][1] $polygon[$last]['x'] $polygon[$last]['y'] $polygon[0]['x'] @@ -7287,7 +7143,7 @@ $params[$index]['POLYGON'] $params[$index]['POLYGON'] - + $area $area $area @@ -7299,10 +7155,7 @@ $p1 $p1 $p2 - $params[$index]['POLYGON'][$j][$i]['x'] - $params[$index]['POLYGON'][$j][$i]['y'] $params['srid'] - $point $pointA['x'] $pointA['y'] $pointB['x'] @@ -7319,7 +7172,7 @@ float - + $area $area $epsilon * ($y1 - $y0) @@ -7329,10 +7182,6 @@ $pointA['x'] $pointB['x'] $point['y'] - $point[0] - $point[1] - $points_arr[0][0] - $points_arr[0][1] $ring[$i]['x'] $ring[$i]['y'] $x0 diff --git a/test/classes/Gis/GisMultiLineStringTest.php b/test/classes/Gis/GisMultiLineStringTest.php index b1eb705b5a..6918a33f39 100644 --- a/test/classes/Gis/GisMultiLineStringTest.php +++ b/test/classes/Gis/GisMultiLineStringTest.php @@ -349,9 +349,9 @@ class GisMultiLineStringTest extends GisGeomTestCase 'height' => 150, ], '/^()$/', ], ];