Skip to content

Commit 85a0859

Browse files
Merge pull request #9 from rseyferth/master
Add PHP 7.4 compatability
2 parents 20c0472 + 4b4c4ae commit 85a0859

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

PolyUtil.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public static function decode($encodedPath) {
333333
$shift = 0;
334334
$b;
335335
do {
336-
$b = ord($encodedPath{$index++}) - 63 - 1;
336+
$b = ord($encodedPath[$index++]) - 63 - 1;
337337
$result += $b << $shift;
338338
$shift += 5;
339339
} while ($b >= hexdec("0x1f"));
@@ -343,7 +343,7 @@ public static function decode($encodedPath) {
343343
$result = 1;
344344
$shift = 0;
345345
do {
346-
$b = ord($encodedPath{$index++}) - 63 - 1;
346+
$b = ord($encodedPath[$index++]) - 63 - 1;
347347
$result += $b << $shift;
348348
$shift += 5;
349349
} while ($b >= hexdec("0x1f"));

composer.json

+22-20
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
{
22
"name": "alexpechkarev/geometry-library",
33
"description": "PHP Geometry library provides utility functions for the computation of geometric data on the surface of the Earth.",
4-
"version":"1.0.1",
5-
"keywords": ["google maps geometry library", "php geometry library", "spherical geometry utilities", "encoding and decoding polyline paths utilities", "computations polygons and polylines"],
6-
"homepage":"https://alexpechkarev.github.io/geometry-library/",
4+
"version": "1.0.2",
5+
"keywords": [
6+
"google maps geometry library",
7+
"php geometry library",
8+
"spherical geometry utilities",
9+
"encoding and decoding polyline paths utilities",
10+
"computations polygons and polylines"
11+
],
12+
"homepage": "https://alexpechkarev.github.io/geometry-library/",
713
"license": "MIT",
8-
"authors": [
9-
{
10-
"name": "Alexander Pechkarev",
11-
"email": "alexpechkarev@gmail.com"
12-
}
13-
],
14-
"minimum-stability": "stable",
15-
14+
"authors": [
15+
{
16+
"name": "Alexander Pechkarev",
17+
"email": "alexpechkarev@gmail.com"
18+
}
19+
],
20+
"minimum-stability": "stable",
1621
"autoload": {
1722
"psr-4": {
1823
"GeometryLibrary\\": "/"
1924
}
20-
},
21-
22-
"extra": {
23-
"branch-alias": {
24-
"dev-master": "1.0-dev"
25-
}
26-
}
27-
28-
25+
},
26+
"extra": {
27+
"branch-alias": {
28+
"dev-master": "1.0-dev"
29+
}
30+
}
2931
}

0 commit comments

Comments
 (0)