Skip to content

Commit

Permalink
fix: remove Laravel dependency (Arr helper) (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches authored Aug 20, 2024
1 parent ca9caf9 commit 311f204
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 306 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
},
"minimum-stability": "stable",
"require": {
"php": "^8.2",
"illuminate/collections": "^11.20"
"php": "^8.2"
},
"require-dev": {
"laravel/pint": "^1.17",
Expand Down
304 changes: 2 additions & 302 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/Bytey.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

namespace Sourcetoad\Bytey;

use Illuminate\Support\Arr;
use RecursiveArrayIterator;
use RecursiveIteratorIterator;

class Bytey
{
Expand All @@ -22,7 +23,7 @@ class Bytey
public static function googlePolylineEncode(array $coordinates): string
{
$tupleSize = count($coordinates[0] ?? []);
$coordinates = Arr::flatten($coordinates);
$coordinates = new RecursiveIteratorIterator(new RecursiveArrayIterator($coordinates));
$previous = array_fill(0, $tupleSize, 0);

$encodedString = '';
Expand Down

0 comments on commit 311f204

Please sign in to comment.