Skip to content

Commit 24da787

Browse files
authored
Merge pull request #1199 from php-api-clients/GitHub/from-1.1.4-90291aa8f69083a3b160c871835515fc-from-1.1.4-90291aa8f69083a3b160c871835515fc
2 parents 065dd30 + 38373cb commit 24da787

File tree

7 files changed

+20
-3082
lines changed

7 files changed

+20
-3082
lines changed

clients/GitHub/etc/openapi-client-generator.state

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "30445c941a97be3bcb4ba3b3bae9e8f3",
2+
"specHash": "90291aa8f69083a3b160c871835515fc",
33
"generatedFiles": {
44
"files": [
55
{
@@ -2398,10 +2398,6 @@
23982398
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertResolved.php",
23992399
"hash": "a7318c11f4f8eebbf3da10aba0624516"
24002400
},
2401-
{
2402-
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertRevoked.php",
2403-
"hash": "c45f03d885ee4705b069d3fe165f2be7"
2404-
},
24052401
{
24062402
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookSecurityAdvisoryPublished.php",
24072403
"hash": "7dbd7cc12b666acd3b9332048c807de6"
@@ -5668,7 +5664,7 @@
56685664
},
56695665
{
56705666
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/WebHooks.php",
5671-
"hash": "3b8513aeb1b3d6895427fe3e03325435"
5667+
"hash": "f7c6ac32c80159d1420bf43843340bad"
56725668
},
56735669
{
56745670
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php",
@@ -27236,7 +27232,7 @@
2723627232
},
2723727233
{
2723827234
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
27239-
"hash": "f8a62fdffbd42820e452155cf51ca62f"
27235+
"hash": "a56ba7b9df5fbe1b7453f77e6ba6fd2c"
2724027236
},
2724127237
{
2724227238
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php",
@@ -28108,7 +28104,7 @@
2810828104
},
2810928105
{
2811028106
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/WebHook\/SecretScanningAlert.php",
28111-
"hash": "f5b4a68d18fa73bd6db6c300bc6d2119"
28107+
"hash": "8594714076741ae50b0b792ff068abf5"
2811228108
},
2811328109
{
2811428110
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/WebHook\/SecretScanningAlertLocation.php",
@@ -28392,7 +28388,7 @@
2839228388
},
2839328389
{
2839428390
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecretScanningAlert.php",
28395-
"hash": "a4eb94e252a7fc2a08d9a635a134cc68"
28391+
"hash": "1621b9c57c53b43ddaebc74fc442ae0b"
2839628392
},
2839728393
{
2839828394
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecretScanningAlertLocation.php",

clients/GitHub/src/Internal/Hydrator/WebHook/SecretScanningAlert.php

-208
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertCreated;
2020
use ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertReopened;
2121
use ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertResolved;
22-
use ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertRevoked;
2322
use ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertValidated;
2423
use EventSauce\ObjectHydrator\IterableList;
2524
use EventSauce\ObjectHydrator\ObjectMapper;
@@ -71,7 +70,6 @@ public function hydrateObject(string $className, array $payload): object
7170
'ApiClients\Client\GitHub\Schema\SimpleUserWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($payload),
7271
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertReopened' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertReopened($payload),
7372
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertResolved' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertResolved($payload),
74-
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertRevoked' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertRevoked($payload),
7573
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertValidated' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertValidated($payload),
7674
'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($payload),
7775
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
@@ -4168,156 +4166,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh
41684166
}
41694167
}
41704168

4171-
private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertRevoked(array $payload): WebhookSecretScanningAlertRevoked
4172-
{
4173-
$properties = [];
4174-
$missingFields = [];
4175-
try {
4176-
$value = $payload['action'] ?? null;
4177-
4178-
if ($value === null) {
4179-
$missingFields[] = 'action';
4180-
goto after_action;
4181-
}
4182-
4183-
$properties['action'] = $value;
4184-
4185-
after_action:
4186-
4187-
$value = $payload['alert'] ?? null;
4188-
4189-
if ($value === null) {
4190-
$missingFields[] = 'alert';
4191-
goto after_alert;
4192-
}
4193-
4194-
if (is_array($value)) {
4195-
try {
4196-
$this->hydrationStack[] = 'alert';
4197-
$value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecretScanningAlertWebhook($value);
4198-
} finally {
4199-
array_pop($this->hydrationStack);
4200-
}
4201-
}
4202-
4203-
$properties['alert'] = $value;
4204-
4205-
after_alert:
4206-
4207-
$value = $payload['enterprise'] ?? null;
4208-
4209-
if ($value === null) {
4210-
$properties['enterprise'] = null;
4211-
goto after_enterprise;
4212-
}
4213-
4214-
if (is_array($value)) {
4215-
try {
4216-
$this->hydrationStack[] = 'enterprise';
4217-
$value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($value);
4218-
} finally {
4219-
array_pop($this->hydrationStack);
4220-
}
4221-
}
4222-
4223-
$properties['enterprise'] = $value;
4224-
4225-
after_enterprise:
4226-
4227-
$value = $payload['installation'] ?? null;
4228-
4229-
if ($value === null) {
4230-
$properties['installation'] = null;
4231-
goto after_installation;
4232-
}
4233-
4234-
if (is_array($value)) {
4235-
try {
4236-
$this->hydrationStack[] = 'installation';
4237-
$value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value);
4238-
} finally {
4239-
array_pop($this->hydrationStack);
4240-
}
4241-
}
4242-
4243-
$properties['installation'] = $value;
4244-
4245-
after_installation:
4246-
4247-
$value = $payload['organization'] ?? null;
4248-
4249-
if ($value === null) {
4250-
$properties['organization'] = null;
4251-
goto after_organization;
4252-
}
4253-
4254-
if (is_array($value)) {
4255-
try {
4256-
$this->hydrationStack[] = 'organization';
4257-
$value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value);
4258-
} finally {
4259-
array_pop($this->hydrationStack);
4260-
}
4261-
}
4262-
4263-
$properties['organization'] = $value;
4264-
4265-
after_organization:
4266-
4267-
$value = $payload['repository'] ?? null;
4268-
4269-
if ($value === null) {
4270-
$missingFields[] = 'repository';
4271-
goto after_repository;
4272-
}
4273-
4274-
if (is_array($value)) {
4275-
try {
4276-
$this->hydrationStack[] = 'repository';
4277-
$value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($value);
4278-
} finally {
4279-
array_pop($this->hydrationStack);
4280-
}
4281-
}
4282-
4283-
$properties['repository'] = $value;
4284-
4285-
after_repository:
4286-
4287-
$value = $payload['sender'] ?? null;
4288-
4289-
if ($value === null) {
4290-
$properties['sender'] = null;
4291-
goto after_sender;
4292-
}
4293-
4294-
if (is_array($value)) {
4295-
try {
4296-
$this->hydrationStack[] = 'sender';
4297-
$value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($value);
4298-
} finally {
4299-
array_pop($this->hydrationStack);
4300-
}
4301-
}
4302-
4303-
$properties['sender'] = $value;
4304-
4305-
after_sender:
4306-
} catch (Throwable $exception) {
4307-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertRevoked', $exception, stack: $this->hydrationStack);
4308-
}
4309-
4310-
if (count($missingFields) > 0) {
4311-
throw UnableToHydrateObject::dueToMissingFields(WebhookSecretScanningAlertRevoked::class, $missingFields, stack: $this->hydrationStack);
4312-
}
4313-
4314-
try {
4315-
return new WebhookSecretScanningAlertRevoked(...$properties);
4316-
} catch (Throwable $exception) {
4317-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertRevoked', $exception, stack: $this->hydrationStack);
4318-
}
4319-
}
4320-
43214169
private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertValidated(array $payload): WebhookSecretScanningAlertValidated
43224170
{
43234171
$properties = [];
@@ -4534,7 +4382,6 @@ public function serializeObjectOfType(object $object, string $className): mixed
45344382
'ApiClients\Client\GitHub\Schema\SimpleUserWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($object),
45354383
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertReopened' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertReopened($object),
45364384
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertResolved' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertResolved($object),
4537-
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertRevoked' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertRevoked($object),
45384385
'ApiClients\Client\GitHub\Schema\WebhookSecretScanningAlertValidated' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertValidated($object),
45394386
default => throw new LogicException('No serialization defined for $className'),
45404387
};
@@ -6679,61 +6526,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema
66796526
return $result;
66806527
}
66816528

6682-
private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertRevoked(mixed $object): mixed
6683-
{
6684-
assert($object instanceof WebhookSecretScanningAlertRevoked);
6685-
$result = [];
6686-
6687-
$action = $object->action;
6688-
after_action: $result['action'] = $action;
6689-
6690-
$alert = $object->alert;
6691-
$alert = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SecretScanningAlertWebhook($alert);
6692-
after_alert: $result['alert'] = $alert;
6693-
6694-
$enterprise = $object->enterprise;
6695-
6696-
if ($enterprise === null) {
6697-
goto after_enterprise;
6698-
}
6699-
6700-
$enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($enterprise);
6701-
after_enterprise: $result['enterprise'] = $enterprise;
6702-
6703-
$installation = $object->installation;
6704-
6705-
if ($installation === null) {
6706-
goto after_installation;
6707-
}
6708-
6709-
$installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation);
6710-
after_installation: $result['installation'] = $installation;
6711-
6712-
$organization = $object->organization;
6713-
6714-
if ($organization === null) {
6715-
goto after_organization;
6716-
}
6717-
6718-
$organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization);
6719-
after_organization: $result['organization'] = $organization;
6720-
6721-
$repository = $object->repository;
6722-
$repository = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks($repository);
6723-
after_repository: $result['repository'] = $repository;
6724-
6725-
$sender = $object->sender;
6726-
6727-
if ($sender === null) {
6728-
goto after_sender;
6729-
}
6730-
6731-
$sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($sender);
6732-
after_sender: $result['sender'] = $sender;
6733-
6734-
return $result;
6735-
}
6736-
67376529
private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookSecretScanningAlertValidated(mixed $object): mixed
67386530
{
67396531
assert($object instanceof WebhookSecretScanningAlertValidated);

0 commit comments

Comments
 (0)