Skip to content

Commit

Permalink
Use interface to validate exception
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeder committed Jun 12, 2024
1 parent 6610e86 commit 48b4957
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/ETL/Extract/DataJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Harvest\ETL\Extract;

use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use Harvest\Util;

class DataJson extends Extract
Expand All @@ -17,11 +18,11 @@ class DataJson extends Extract
/**
* Inject the guzzle client.
*
* @var \GuzzleHttp\Client
* @var \GuzzleHttp\ClientInterface
*/
protected $client;

public function __construct(object $harvest_plan, Client $client = null)
public function __construct(object $harvest_plan, ClientInterface $client = null)
{
$this->client = $client ?? new Client();
$this->harvest_plan = $harvest_plan;
Expand Down
3 changes: 0 additions & 3 deletions src/ETL/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

namespace Harvest\ETL;

use Harvest\Storage\StorageInterface;
use Opis\JsonSchema\Validator;
use Opis\JsonSchema\ValidationResult;
use Opis\JsonSchema\ValidationError;
use Opis\JsonSchema\Schema;

class Factory
Expand Down

0 comments on commit 48b4957

Please sign in to comment.