Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanYadaev committed Apr 2, 2024
1 parent 3b18793 commit b4d00ec
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions tests/Objects/GeometryCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
new Point(0, 180),
]);

$geometryCollectionFromJson = GeometryCollection::fromArray(json_decode('{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]},{"type":"Point","coordinates":[180,0]}]}',true));
$geometryCollectionFromJson = GeometryCollection::fromArray(json_decode('{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]},{"type":"Point","coordinates":[180,0]}]}', true));

expect($geometryCollectionFromJson)->toEqual($geometryCollection);
});
Expand All @@ -140,7 +140,7 @@
new Point(0, 180),
], Srid::WGS84->value);

$geometryCollectionFromJson = GeometryCollection::fromArray(json_decode('{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]},{"type":"Point","coordinates":[180,0]}]}',true), Srid::WGS84->value);
$geometryCollectionFromJson = GeometryCollection::fromArray(json_decode('{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]},{"type":"Point","coordinates":[180,0]}]}', true), Srid::WGS84->value);

expect($geometryCollectionFromJson)->toEqual($geometryCollection);
});
Expand Down Expand Up @@ -197,7 +197,7 @@
new Point(0, 180),
]);

$geometryCollectionFromFeatureCollectionJson = GeometryCollection::fromArray(json_decode('{"type":"FeatureCollection","features":[{"type":"Feature","properties":[],"geometry":{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]}},{"type":"Feature","properties":[],"geometry":{"type":"Point","coordinates":[180,0]}}]}',true));
$geometryCollectionFromFeatureCollectionJson = GeometryCollection::fromArray(json_decode('{"type":"FeatureCollection","features":[{"type":"Feature","properties":[],"geometry":{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]}},{"type":"Feature","properties":[],"geometry":{"type":"Point","coordinates":[180,0]}}]}', true));

expect($geometryCollectionFromFeatureCollectionJson)->toEqual($geometryCollection);
});
Expand All @@ -216,7 +216,7 @@
new Point(0, 180),
], Srid::WGS84);

$geometryCollectionFromFeatureCollectionJson = GeometryCollection::fromArray(json_decode('{"type":"FeatureCollection","features":[{"type":"Feature","properties":[],"geometry":{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]}},{"type":"Feature","properties":[],"geometry":{"type":"Point","coordinates":[180,0]}}]}',true), Srid::WGS84);
$geometryCollectionFromFeatureCollectionJson = GeometryCollection::fromArray(json_decode('{"type":"FeatureCollection","features":[{"type":"Feature","properties":[],"geometry":{"type":"Polygon","coordinates":[[[180,0],[179,1],[178,2],[177,3],[180,0]]]}},{"type":"Feature","properties":[],"geometry":{"type":"Point","coordinates":[180,0]}}]}', true), Srid::WGS84);

expect($geometryCollectionFromFeatureCollectionJson)->toEqual($geometryCollection);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/Objects/LineStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
new Point(1, 179),
]);

$lineStringFromJson = LineString::fromArray(["type"=>"LineString","coordinates"=>[[180,0],[179,1]]]);
$lineStringFromJson = LineString::fromArray(['type' => 'LineString', 'coordinates' => [[180, 0], [179, 1]]]);

expect($lineStringFromJson)->toEqual($lineString);
});
Expand All @@ -83,7 +83,7 @@
new Point(1, 179),
], Srid::WGS84->value);

$lineStringFromJson = LineString::fromArray(["type"=>"LineString","coordinates"=>[[180,0],[179,1]]], Srid::WGS84->value);
$lineStringFromJson = LineString::fromArray(['type' => 'LineString', 'coordinates' => [[180, 0], [179, 1]]], Srid::WGS84->value);

expect($lineStringFromJson)->toEqual($lineString);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/Objects/MultiLineStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
]),
]);

$multiLineStringFromJson = MultiLineString::fromArray(["type"=>"MultiLineString","coordinates"=>[[[180,0],[179,1]]]]);
$multiLineStringFromJson = MultiLineString::fromArray(['type' => 'MultiLineString', 'coordinates' => [[[180, 0], [179, 1]]]]);

expect($multiLineStringFromJson)->toEqual($multiLineString);
});
Expand All @@ -97,7 +97,7 @@
]),
], Srid::WGS84->value);

$multiLineStringFromJson = MultiLineString::fromArray(["type"=>"MultiLineString","coordinates"=>[[[180,0],[179,1]]]], Srid::WGS84->value);
$multiLineStringFromJson = MultiLineString::fromArray(['type' => 'MultiLineString', 'coordinates' => [[[180, 0], [179, 1]]]], Srid::WGS84->value);

expect($multiLineStringFromJson)->toEqual($multiLineString);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/Objects/MultiPointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
new Point(0, 180),
]);

$multiPointFromJson = MultiPoint::fromArray(["type"=>"MultiPoint","coordinates"=>[[180,0]]]);
$multiPointFromJson = MultiPoint::fromArray(['type' => 'MultiPoint', 'coordinates' => [[180, 0]]]);

expect($multiPointFromJson)->toEqual($multiPoint);
});
Expand All @@ -76,7 +76,7 @@
new Point(0, 180),
], Srid::WGS84->value);

$multiPointFromJson = MultiPoint::fromArray(["type"=>"MultiPoint","coordinates"=>[[180,0]]], Srid::WGS84->value);
$multiPointFromJson = MultiPoint::fromArray(['type' => 'MultiPoint', 'coordinates' => [[180, 0]]], Srid::WGS84->value);

expect($multiPointFromJson)->toEqual($multiPoint);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/Objects/MultiPolygonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
]),
]);

$multiPolygonFromJson = MultiPolygon::fromArray(["type"=>"MultiPolygon","coordinates"=>[[[[180,0],[179,1],[178,2],[177,3],[180,0]]]]]);
$multiPolygonFromJson = MultiPolygon::fromArray(['type' => 'MultiPolygon', 'coordinates' => [[[[180, 0], [179, 1], [178, 2], [177, 3], [180, 0]]]]]);

expect($multiPolygonFromJson)->toEqual($multiPolygon);
});
Expand All @@ -133,7 +133,7 @@
]),
], Srid::WGS84->value);

$multiPolygonFromJson = MultiPolygon::fromArray(["type"=>"MultiPolygon","coordinates"=>[[[[180,0],[179,1],[178,2],[177,3],[180,0]]]]], Srid::WGS84->value);
$multiPolygonFromJson = MultiPolygon::fromArray(['type' => 'MultiPolygon', 'coordinates' => [[[[180, 0], [179, 1], [178, 2], [177, 3], [180, 0]]]]], Srid::WGS84->value);

expect($multiPolygonFromJson)->toEqual($multiPolygon);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/Objects/PointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
it('creates point from Array', function (): void {
$point = new Point(0, 180);

$pointFromJson = Point::fromArray(["type"=>"Point","coordinates"=>[180,0]]);
$pointFromJson = Point::fromArray(['type' => 'Point', 'coordinates' => [180, 0]]);

expect($pointFromJson)->toEqual($point);
});

it('creates point with SRID from Array', function (): void {
$point = new Point(0, 180, Srid::WGS84->value);

$pointFromJson = Point::fromArray(["type"=>"Point","coordinates"=>[180,0]], Srid::WGS84->value);
$pointFromJson = Point::fromArray(['type' => 'Point', 'coordinates' => [180, 0]], Srid::WGS84->value);

expect($pointFromJson)->toEqual($point);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/Objects/PolygonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
]),
]);

$polygonFromJson = Polygon::fromArray(["type"=>"Polygon","coordinates"=>[[[180,0],[179,1],[178,2],[177,3],[180,0]]]]);
$polygonFromJson = Polygon::fromArray(['type' => 'Polygon', 'coordinates' => [[[180, 0], [179, 1], [178, 2], [177, 3], [180, 0]]]]);

expect($polygonFromJson)->toEqual($polygon);
});
Expand All @@ -118,7 +118,7 @@
]),
], Srid::WGS84->value);

$polygonFromJson = Polygon::fromArray(["type"=>"Polygon","coordinates"=>[[[180,0],[179,1],[178,2],[177,3],[180,0]]]], Srid::WGS84->value);
$polygonFromJson = Polygon::fromArray(['type' => 'Polygon', 'coordinates' => [[[180, 0], [179, 1], [178, 2], [177, 3], [180, 0]]]], Srid::WGS84->value);

expect($polygonFromJson)->toEqual($polygon);
});
Expand Down

0 comments on commit b4d00ec

Please sign in to comment.