Skip to content

Commit c796e42

Browse files
committed
WIP
1 parent 61e969a commit c796e42

File tree

6 files changed

+7
-14
lines changed

6 files changed

+7
-14
lines changed

.phpunit.cache/test-results

+1-1
Large diffs are not rendered by default.

phpstan.neon.dist

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 4
5+
level: 5
66
paths:
77
- src
88
- config
99
tmpDir: build/phpstan
1010
checkOctaneCompatibility: true
1111
checkModelProperties: true
12-
checkMissingIterableValueType: false
13-
12+
noEnvCallsOutsideOfConfig: false

src/Connectors/DocuWareConnector.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ public function __construct(
2424
public ConfigWithCredentials|ConfigWithCredentialsTrustedUser $configuration
2525
) {}
2626

27-
/**
28-
* @throws \Exception
29-
*/
3027
public function resolveBaseUrl(): string
3128
{
3229
return $this->configuration->url.'/DocuWare/Platform';
@@ -79,6 +76,7 @@ protected function getOrCreateNewOAuthToken(): string
7976
}
8077

8178
// Handle token retrieval for ConfigWithCredentialsTrustedUser
79+
// @phpstan-ignore-next-line
8280
if ($this->configuration instanceof ConfigWithCredentialsTrustedUser) {
8381
$token = $this->getNewOAuthTokenWithCredentialsTrustedUser();
8482
DocuWareOAuthLog::dispatch($this->configuration->url, $this->configuration->username, 'Token retrieved from API');

src/DTO/Documents/Document.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ protected static function convertFields(Collection $fields): Collection
5050
});
5151
}
5252

53-
protected static function convertSuggestions(Collection $suggestions): ?Collection
53+
protected static function convertSuggestions(Collection $suggestions): Collection
5454
{
5555
return $suggestions->mapWithKeys(function (array $suggestion) {
5656
return [$suggestion['DBName'] => SuggestionField::fromJson($suggestion)];
5757
});
5858
}
5959

60-
protected static function convertSections(Collection $sections): ?Collection
60+
protected static function convertSections(Collection $sections): Collection
6161
{
6262
return $sections->mapWithKeys(function (array $section) {
6363
return [$section['Id'] => Section::fromJson($section)];

src/Requests/Documents/UpdateIndexValues/UpdateIndexValues.php

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues;
44

55
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\PrepareDTO;
6-
use CodebarAg\DocuWare\Exceptions\UnableToUpdateFields;
76
use CodebarAg\DocuWare\Responses\Documents\UpdateIndexValues\UpdateIndexValuesResponse;
87
use Illuminate\Support\Collection;
98
use Saloon\Contracts\Body\HasBody;
@@ -18,9 +17,6 @@ class UpdateIndexValues extends Request implements HasBody
1817

1918
protected Method $method = Method::PUT;
2019

21-
/**
22-
* @throws UnableToUpdateFields
23-
*/
2420
public function __construct(
2521
protected readonly string $fileCabinetId,
2622
protected readonly string $documentId,

src/Support/URL.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class URL
1616
*/
1717
public static function format(string $string): string
1818
{
19-
$padding = Str::substrCount($string, '=');
19+
$padding = (string) Str::substrCount($string, '=');
2020

2121
return Str::of($string)
2222
->replace('+', '-')

0 commit comments

Comments
 (0)