Skip to content

Commit

Permalink
add postcode resolver interface
Browse files Browse the repository at this point in the history
  • Loading branch information
wychoong committed Nov 19, 2024
1 parent 8d33afb commit d6463df
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Lunar\Shipping\Interfaces;

use Illuminate\Support\Collection;

interface PostcodeResolverInterface
{
public function getParts($postcode): Collection;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace Lunar\Shipping\Resolvers;

use Illuminate\Support\Collection;
use Lunar\Shipping\Interfaces\PostcodeResolverInterface;

class PostcodeResolver
class PostcodeResolver implements PostcodeResolverInterface
{
public function getParts($postcode): Collection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace Lunar\Tests\Shipping\Stubs\Resolvers;

use Illuminate\Support\Collection;
use Lunar\Shipping\Interfaces\PostcodeResolverInterface;

class TestCustomPostcodeResolver
class TestCustomPostcodeResolver implements PostcodeResolverInterface
{
public function getParts($postcode): Collection
{
Expand Down

0 comments on commit d6463df

Please sign in to comment.