Skip to content

Commit

Permalink
Merge pull request #26 from krystal/chore/update-and-multicore
Browse files Browse the repository at this point in the history
chore: update deps and use multiple cores in cs fixer
  • Loading branch information
bencromwell authored Sep 4, 2024
2 parents 255aad2 + 437bd97 commit b2fdd4a
Show file tree
Hide file tree
Showing 1,050 changed files with 13,339 additions and 9,804 deletions.
7 changes: 7 additions & 0 deletions generator/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

// generation is slow on a single core
// perhaps your machine has many cores we can use?
return (new PhpCsFixer\Config())
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
;
268 changes: 138 additions & 130 deletions generator/composer.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/Core/Endpoint/DeleteAddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\AddressListsAddressListDeleteResponse200', 'json');
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\AddressListsAddressListDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListBadRequestException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator400Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListNotFoundException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAddressListNotFoundResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAddressListNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator429Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator503Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/Core/Endpoint/DeleteAddressListEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\AddressListEntriesAddressListEntryDeleteResponse200', 'json');
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\AddressListEntriesAddressListEntryDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryBadRequestException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator400Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryNotFoundException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAddressListEntryNotFoundResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAddressListEntryNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator429Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator503Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteAddressListEntryServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/Core/Endpoint/DeleteApiToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,25 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ApiTokensApiTokenDeleteResponse200', 'json');
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\ApiTokensApiTokenDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteApiTokenBadRequestException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator400Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteApiTokenBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteApiTokenForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteApiTokenNotFoundException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPITokenNotFoundResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteApiTokenNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPITokenNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (422 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteApiTokenUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseValidationErrorResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteApiTokenUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseValidationErrorResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteApiTokenTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator429Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteApiTokenTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteApiTokenServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator503Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteApiTokenServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
}

Expand Down
14 changes: 7 additions & 7 deletions src/Core/Endpoint/DeleteDisk.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,28 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\DisksDiskDeleteResponse200', 'json');
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\DisksDiskDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskBadRequestException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator400Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskNotFoundException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseDiskNotFoundResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseDiskNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (406 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskNotAcceptableException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseObjectInTrashResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskNotAcceptableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseObjectInTrashResponse', 'json'), $response);
}
if (is_null($contentType) === false && (422 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseValidationErrorResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskUnprocessableEntityException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseValidationErrorResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator429Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator503Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
}

Expand Down
12 changes: 6 additions & 6 deletions src/Core/Endpoint/DeleteDiskBackupPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,25 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re
$status = $response->getStatusCode();
$body = (string) $response->getBody();
if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) {
return $serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\DiskBackupPoliciesDiskBackupPolicyDeleteResponse200', 'json');
return $serializer->deserialize($body, 'KatapultAPI\Core\Model\DiskBackupPoliciesDiskBackupPolicyDeleteResponse200', 'json');
}
if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyBadRequestException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator400Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyBadRequestException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator400Response', 'json'), $response);
}
if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyForbiddenException($response);
}
if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyNotFoundException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseDiskBackupPolicyNotFoundResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyNotFoundException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseDiskBackupPolicyNotFoundResponse', 'json'), $response);
}
if (is_null($contentType) === false && (406 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyNotAcceptableException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseObjectInTrashResponse', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyNotAcceptableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseObjectInTrashResponse', 'json'), $response);
}
if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator429Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyTooManyRequestsException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator429Response', 'json'), $response);
}
if (is_null($contentType) === false && (503 === $status && mb_strpos($contentType, 'application/json') !== false)) {
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\\Core\\Model\\ResponseAPIAuthenticator503Response', 'json'), $response);
throw new \KatapultAPI\Core\Exception\DeleteDiskBackupPolicyServiceUnavailableException($serializer->deserialize($body, 'KatapultAPI\Core\Model\ResponseAPIAuthenticator503Response', 'json'), $response);
}
}

Expand Down
Loading

0 comments on commit b2fdd4a

Please sign in to comment.