Skip to content

Commit

Permalink
Merge pull request #147 from codebar-ag/feature-fix-date-conversion
Browse files Browse the repository at this point in the history
Feature fix date conversion
  • Loading branch information
StanBarrows authored Jul 8, 2024
2 parents 42c4bdc + a39b430 commit 1895f91
Show file tree
Hide file tree
Showing 42 changed files with 44 additions and 90 deletions.
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"pest_2.34.7","defects":[],"times":{"P\\Tests\\Local\\UpdateNichtHandelsrechnungenTest::__pest_evaluable_it_can_update_a_document_value":7.343}}
3 changes: 1 addition & 2 deletions src/DTO/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ public function __construct(
public string $cacheDriver,
public int $cacheLifetimeInSeconds,
public string $requestTimeoutInSeconds,
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/DTO/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public function __construct(
public string $cookie,
public Carbon $cookie_created_at,
public Carbon $cookie_lifetime_until,
) {
}
) {}

public static function make(CookieJar $cookieJar): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/Dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public function __construct(
public bool $isDefault,
public string $fileCabinetId,
public ?array $fields = null,
) {
}
) {}

public function isSearch(): bool
{
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public function __construct(
public Carbon $updated_at,
public ?Collection $fields,
public ?Collection $suggestions,
) {
}
) {}

public function isPdf(): bool
{
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/DocumentField.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public function __construct(
public bool $isNull,
public null|int|float|Carbon|string|Collection $value,
public string $type,
) {
}
) {}

public static function fake(
?bool $systemField = false,
Expand Down
6 changes: 2 additions & 4 deletions src/DTO/DocumentIndex/IndexDateDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class IndexDateDTO
public function __construct(
public string $name,
public null|Carbon|\Carbon\Carbon $value,
) {

}
) {}

public static function make(string $name, null|Carbon|\Carbon\Carbon $value): self
{
Expand All @@ -30,7 +28,7 @@ public function values(): array
{
return [
'FieldName' => $this->name,
'Item' => $this->value->toDateString(),
'Item' => $this->value?->toDateString(),
'ItemElementName' => 'String',
];
}
Expand Down
6 changes: 2 additions & 4 deletions src/DTO/DocumentIndex/IndexDateTimeDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class IndexDateTimeDTO
public function __construct(
public string $name,
public null|Carbon|\Carbon\Carbon $value,
) {

}
) {}

public static function make(string $name, null|Carbon|\Carbon\Carbon $value): self
{
Expand All @@ -30,7 +28,7 @@ public function values(): array
{
return [
'FieldName' => $this->name,
'Item' => $this->value->toDateTimeString(),
'Item' => $this->value?->toDateTimeString(),
'ItemElementName' => 'String',
];
}
Expand Down
4 changes: 1 addition & 3 deletions src/DTO/DocumentIndex/IndexDecimalDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ class IndexDecimalDTO
public function __construct(
public string $name,
public null|int|float $value,
) {

}
) {}

public static function make(string $name, null|int|float $value): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/DTO/DocumentIndex/IndexNumericDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class IndexNumericDTO
public function __construct(
public string $name,
public ?int $value,
) {

}
) {}

public static function make(string $name, ?int $value): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/DTO/DocumentIndex/IndexTableDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class IndexTableDTO
public function __construct(
public string $name,
public null|Collection|array $rows,
) {

}
) {}

public static function make(string $name, null|Collection|array $rows): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/DTO/DocumentIndex/IndexTextDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ class IndexTextDTO
public function __construct(
public string $name,
public ?string $value,
) {

}
) {}

public static function make(string $name, ?string $value): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/DocumentPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function __construct(
public int $to,
public Collection $documents,
public ?ErrorBag $error = null,
) {
}
) {}

public function showPrev(): bool
{
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/DocumentThumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ public function __construct(
public string $mime,
public string $data,
public string $base64,
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/DTO/ErrorBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ class ErrorBag
public function __construct(
public int $code,
public string $message,
) {
}
) {}

public static function make(Exception $e): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct(
public string $label,
public string $type,
public string $scope,
) {
}
) {}

public function isSystem(): bool
{
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/FileCabinet.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public function __construct(
public string $color,
public bool $isBasket,
public ?string $assignedCabinet,
) {
}
) {}

public static function fake(
?string $id = null,
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public function __construct(
public ?string $guid = null,
public array $additionalInfo = [],
public array $configurationRights = [],
) {
}
) {}

public static function fake(
?string $id = null,
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/OrganizationIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function __construct(
public string $id,
public string $name,
public ?string $guid = null,
) {
}
) {}

public static function fake(
?string $id = null,
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ public function __construct(
public string $contentModified,
public bool $annotationsPreview,
public ?bool $hasTextAnnotations = null,
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/DTO/SuggestionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct(
public ?string $name,
public ?string $db_name,
public ?string $confidence,
) {
}
) {}

public static function fake(
array $value = [],
Expand Down
3 changes: 1 addition & 2 deletions src/DTO/TableRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ protected static function convertFields(Collection $fields): Collection

public function __construct(
public Collection $fields,
) {
}
) {}

public static function fake(
?Collection $fields = null,
Expand Down
3 changes: 1 addition & 2 deletions src/Events/DocuWareCookieCreatedLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ class DocuWareCookieCreatedLog

public function __construct(
public string $message
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Events/DocuWareResponseLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ class DocuWareResponseLog

public function __construct(
public Response|SaloonResponse $response
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/Requests/Auth/PostLoginRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public function __construct(
protected readonly bool $rememberMe = false,
protected readonly bool $redirectToMyselfInCaseOfError = false,
protected readonly ?string $licenseType = null,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Dialogs/GetDialogRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class GetDialogRequest extends Request implements Cacheable
public function __construct(
protected readonly string $fileCabinetId,
protected readonly string $dialogId
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Dialogs/GetDialogsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class GetDialogsRequest extends Request implements Cacheable

public function __construct(
protected readonly string $fileCabinetId
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/DeleteDocumentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class DeleteDocumentRequest extends Request
public function __construct(
protected readonly string $fileCabinetId,
protected readonly string $documentId,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/GetDocumentCountRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class GetDocumentCountRequest extends Request implements Cacheable
public function __construct(
protected readonly string $fileCabinetId,
protected readonly string $dialogId,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/GetDocumentDownloadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class GetDocumentDownloadRequest extends Request implements Cacheable
public function __construct(
protected readonly string $fileCabinetId,
protected readonly int $documentId,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/GetDocumentPreviewRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class GetDocumentPreviewRequest extends Request implements Cacheable
public function __construct(
protected readonly string $fileCabinetId,
protected readonly string $documentId,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/GetDocumentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class GetDocumentRequest extends Request implements Cacheable
public function __construct(
protected readonly string $fileCabinetId,
protected readonly string $documentId,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/GetDocumentsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public function __construct(
protected readonly string $fileCabinetId,
protected readonly int $page = 1,
protected readonly int $perPage = 50,
) {
}
) {}

public function defaultQuery(): array
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/PostDocumentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public function __construct(
protected readonly ?string $fileContent,
protected readonly ?string $fileName,
protected readonly ?Collection $indexes = null,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/PostTransferDocumentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct(
protected readonly string $storeDialogId,
protected readonly string $documentId,
protected readonly array $fields = [],
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Document/PutDocumentFieldsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public function __construct(
protected readonly string $documentId,
protected readonly ?Collection $indexes = null,
protected readonly bool $forceUpdate = false,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct(
protected readonly string $fileCabinetId,
protected readonly string $thumbnailId,
protected readonly int $page = 0,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Fields/GetFieldsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class GetFieldsRequest extends Request implements Cacheable

public function __construct(
protected readonly string $fileCabinetId
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Requests/Organization/GetOrganizationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class GetOrganizationRequest extends Request implements Cacheable

public function __construct(
public string $organizationId,
) {
}
) {}

public function resolveEndpoint(): string
{
Expand Down
Loading

0 comments on commit 1895f91

Please sign in to comment.