Skip to content

Commit

Permalink
Merge pull request #159 from codebar-ag/feature-passphrase
Browse files Browse the repository at this point in the history
Passphrase
  • Loading branch information
StanBarrows authored Aug 31, 2024
2 parents 7061cc0 + 0b0e8c6 commit bbacbf9
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .phpunit.cache/test-results

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/DocuWare.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function url(
string $url,
string $username,
string $password,
?string $passphrase = null
string $passphrase
): DocuWareUrl {
return new DocuWareUrl(
url: $url,
Expand Down
8 changes: 1 addition & 7 deletions src/DocuWareUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use Carbon\Carbon;
use CodebarAg\DocuWare\Exceptions\UnableToMakeUrl;
use CodebarAg\DocuWare\Support\EnsureValidCredentials;
use CodebarAg\DocuWare\Support\EnsureValidPassphrase;
use CodebarAg\DocuWare\Support\URL;

class DocuWareUrl
Expand All @@ -22,7 +20,7 @@ public function __construct(
public string $url,
public string $username,
public string $password,
public ?string $passphrase,
public string $passphrase,
) {}

public function fileCabinet(string $fileCabinetId): self
Expand Down Expand Up @@ -107,10 +105,6 @@ public function make(): string

protected function guard(): void
{
EnsureValidCredentials::check();

EnsureValidPassphrase::check();

throw_if(
is_null($this->documentId),
UnableToMakeUrl::documentNotSet(),
Expand Down
29 changes: 0 additions & 29 deletions src/Support/EnsureValidCredentials.php

This file was deleted.

16 changes: 0 additions & 16 deletions src/Support/EnsureValidPassphrase.php

This file was deleted.

4 changes: 2 additions & 2 deletions tests/Feature/DocuWareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
url: config('laravel-docuware.credentials.url'),
username: config('laravel-docuware.credentials.username'),
password: config('laravel-docuware.credentials.password'),
passphrase: config('laravel-docuware.credentials.passphrase'),
passphrase: config('laravel-docuware.passphrase'),
)
->fileCabinet($fileCabinetId)
->document($documentId)
Expand Down Expand Up @@ -45,7 +45,7 @@
url: config('laravel-docuware.credentials.url'),
username: config('laravel-docuware.credentials.username'),
password: config('laravel-docuware.credentials.password'),
passphrase: config('laravel-docuware.credentials.passphrase'),
passphrase: config('laravel-docuware.passphrase'),
)
->basket($basketId)
->document($documentId)
Expand Down

0 comments on commit bbacbf9

Please sign in to comment.