Skip to content

Commit

Permalink
Added spacing before hydration methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
KSGRelewise committed Oct 10, 2024
1 parent d2be629 commit b83c4a0
Show file tree
Hide file tree
Showing 868 changed files with 1,072 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Generator/PhpMemberWriters/PhpHydrationMethodsWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public void Write(IndentedTextWriter writer, Type type, string typeName, (Proper
{
if (type.IsAbstract || type.IsInterface)
{
writer.WriteLine();
writer.WriteLine("public static function hydrate(array $arr)");
writer.WriteLine("{");
writer.Indent++;
Expand Down Expand Up @@ -43,6 +44,7 @@ public void Write(IndentedTextWriter writer, Type type, string typeName, (Proper
writer.Indent--;
writer.WriteLine("}");

writer.WriteLine();
writer.WriteLine("public static function hydrateBase(mixed $result, array $arr)");
writer.WriteLine("{");
writer.Indent++;
Expand All @@ -60,6 +62,7 @@ public void Write(IndentedTextWriter writer, Type type, string typeName, (Proper
}
else
{
writer.WriteLine();
writer.WriteLine($"public static function hydrate(array $arr) : {typeName}");
writer.WriteLine("{");
writer.Indent++;
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbandonedCartTriggerConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static function create(string $name, string $description, string $cartNam
$result->cartName = $cartName;
return $result;
}

public static function hydrate(array $arr) : AbandonedCartTriggerConfiguration
{
$result = AbandonedCartTriggerResultTriggerConfiguration::hydrateBase(new AbandonedCartTriggerConfiguration(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbandonedCartTriggerResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public static function create() : AbandonedCartTriggerResult
$result = new AbandonedCartTriggerResult();
return $result;
}

public static function hydrate(array $arr) : AbandonedCartTriggerResult
{
$result = new AbandonedCartTriggerResult();
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AbandonedCartTriggerResultTriggerConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
abstract class AbandonedCartTriggerResultTriggerConfiguration extends TriggerConfiguration implements JsonSerializable
{
public string $typeDefinition = "";

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -16,6 +17,7 @@ public static function hydrate(array $arr)
return AbandonedCartTriggerConfiguration::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = TriggerConfiguration::hydrateBase($result, $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbandonedContentSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public static function create() : AbandonedContentSearch
$result = new AbandonedContentSearch();
return $result;
}

public static function hydrate(array $arr) : AbandonedContentSearch
{
$result = stringAbandonedSearch::hydrateBase(new AbandonedContentSearch(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbandonedProductCategorySearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public static function create() : AbandonedProductCategorySearch
$result = new AbandonedProductCategorySearch();
return $result;
}

public static function hydrate(array $arr) : AbandonedProductCategorySearch
{
$result = stringAbandonedSearch::hydrateBase(new AbandonedProductCategorySearch(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbandonedProductSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public static function create() : AbandonedProductSearch
$result = new AbandonedProductSearch();
return $result;
}

public static function hydrate(array $arr) : AbandonedProductSearch
{
$result = ProductAndVariantIdAbandonedSearch::hydrateBase(new AbandonedProductSearch(), $arr);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AbandonedSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ abstract class AbandonedSearch
public string $loweredSearchTerm;
public int $hits;
public ?Language $language;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -24,6 +25,7 @@ public static function hydrate(array $arr)
return AbandonedProductSearch::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
if (array_key_exists("loweredSearchTerm", $arr))
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbandonedSearchTriggerConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static function create(string $name, string $description, array $searchTy
$result->suppressOnEntityFromSearchResultViewed = $suppressOnEntityFromSearchResultViewed;
return $result;
}

public static function hydrate(array $arr) : AbandonedSearchTriggerConfiguration
{
$result = AbandonedSearchTriggerResultTriggerConfiguration::hydrateBase(new AbandonedSearchTriggerConfiguration(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AbandonedSearchTriggerResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static function create() : AbandonedSearchTriggerResult
$result = new AbandonedSearchTriggerResult();
return $result;
}

public static function hydrate(array $arr) : AbandonedSearchTriggerResult
{
$result = new AbandonedSearchTriggerResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
abstract class AbandonedSearchTriggerResultTriggerConfiguration extends TriggerConfiguration implements JsonSerializable
{
public string $typeDefinition = "";

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -16,6 +17,7 @@ public static function hydrate(array $arr)
return AbandonedSearchTriggerConfiguration::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = TriggerConfiguration::hydrateBase($result, $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/Advertiser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static function create(?string $id, AdvertiserEntityState $state, string
$result->allowedLocations = $allowedLocations;
return $result;
}

public static function hydrate(array $arr) : Advertiser
{
$result = AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity::hydrateBase(new Advertiser(), $arr);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AdvertiserAdvertiserEntityStateEntityResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ abstract class AdvertiserAdvertiserEntityStateEntityResponse extends TimedRespon
public array $entities;
public int $hits;
public array $hitsPerState;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -16,6 +17,7 @@ public static function hydrate(array $arr)
return AdvertisersResponse::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = TimedResponse::hydrateBase($result, $arr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ abstract class AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSo
public ?AdvertisersRequestSortBySorting $sorting;
public int $skip;
public int $take;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -17,6 +18,7 @@ public static function hydrate(array $arr)
return AdvertisersRequest::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = LicensedRequest::hydrateBase($result, $arr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ abstract class AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntity ex
public AdvertiserEntityState $state;
/** Managed server side only, manually setting this will have no effect */
public AdvertiserMetadataValues $metadata;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -16,6 +17,7 @@ public static function hydrate(array $arr)
return Advertiser::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = RetailMediaEntity::hydrateBase($result, $arr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ abstract class AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEnt
public string $typeDefinition = "";
public ?string $term;
public ?array $states;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -15,6 +16,7 @@ public static function hydrate(array $arr)
return AdvertisersRequestEntityFilters::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
if (array_key_exists("term", $arr))
Expand Down
1 change: 1 addition & 0 deletions src/Models/AdvertiserMetadataValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static function create() : AdvertiserMetadataValues
$result = new AdvertiserMetadataValues();
return $result;
}

public static function hydrate(array $arr) : AdvertiserMetadataValues
{
$result = MetadataValues::hydrateBase(new AdvertiserMetadataValues(), $arr);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AdvertiserSaveEntitiesRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ abstract class AdvertiserSaveEntitiesRequest extends LicensedRequest
public string $typeDefinition = "";
public array $entities;
public string $modifiedBy;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -15,6 +16,7 @@ public static function hydrate(array $arr)
return SaveAdvertisersRequest::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = LicensedRequest::hydrateBase($result, $arr);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AdvertiserSaveEntitiesResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ abstract class AdvertiserSaveEntitiesResponse extends TimedResponse
{
public string $typeDefinition = "";
public array $entities;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -14,6 +15,7 @@ public static function hydrate(array $arr)
return SaveAdvertisersResponse::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = TimedResponse::hydrateBase($result, $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AdvertisersRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static function create(?AdvertisersRequestEntityFilters $filters, ?Advert
$result->take = $take;
return $result;
}

public static function hydrate(array $arr) : AdvertisersRequest
{
$result = AdvertiserEntityStateAdvertiserMetadataValuesAdvertisersRequestSortByAdvertisersRequestEntityFiltersEntitiesRequest::hydrateBase(new AdvertisersRequest(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AdvertisersRequestEntityFilters.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static function create() : AdvertisersRequestEntityFilters
$result = new AdvertisersRequestEntityFilters();
return $result;
}

public static function hydrate(array $arr) : AdvertisersRequestEntityFilters
{
$result = AdvertiserEntityStateAdvertiserMetadataValuesRetailMediaEntityEntityFilters::hydrateBase(new AdvertisersRequestEntityFilters(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AdvertisersRequestSortBySorting.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static function create(AdvertisersRequestSortBy $sortBy, SortOrder $sortO
$result->sortOrder = $sortOrder;
return $result;
}

public static function hydrate(array $arr) : AdvertisersRequestSortBySorting
{
$result = new AdvertisersRequestSortBySorting();
Expand Down
1 change: 1 addition & 0 deletions src/Models/AdvertisersResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static function create(int $hits, array $hitsPerState) : AdvertisersRespo
$result->hitsPerState = $hitsPerState;
return $result;
}

public static function hydrate(array $arr) : AdvertisersResponse
{
$result = AdvertiserAdvertiserEntityStateEntityResponse::hydrateBase(new AdvertisersResponse(), $arr);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AnalyzerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ abstract class AnalyzerRequest extends LicensedRequest
public string $typeDefinition = "";
public ?Language $language;
public ?Currency $currency;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -15,6 +16,7 @@ public static function hydrate(array $arr)
return ProductPerformanceRequest::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = LicensedRequest::hydrateBase($result, $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AndCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static function create(UserConditionCollection $conditions, bool $negated
$result->negated = $negated;
return $result;
}

public static function hydrate(array $arr) : AndCondition
{
$result = UserCondition::hydrateBase(new AndCondition(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/AndFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static function create(array $filters, bool $negated = false) : AndFilter
$result->negated = $negated;
return $result;
}

public static function hydrate(array $arr) : AndFilter
{
$result = Filter::hydrateBase(new AndFilter(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/ApplicableIndexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static function create(string ... $indexes) : ApplicableIndexes
$result->indexes = $indexes;
return $result;
}

public static function hydrate(array $arr) : ApplicableIndexes
{
$result = new ApplicableIndexes();
Expand Down
1 change: 1 addition & 0 deletions src/Models/ApplicableLanguages.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static function create(Language ... $languages) : ApplicableLanguages
$result->languages = $languages;
return $result;
}

public static function hydrate(array $arr) : ApplicableLanguages
{
$result = new ApplicableLanguages();
Expand Down
1 change: 1 addition & 0 deletions src/Models/ApplyFilterSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static function create(bool $apply) : ApplyFilterSettings
$result->apply = $apply;
return $result;
}

public static function hydrate(array $arr) : ApplyFilterSettings
{
$result = FilterScopeSettings::hydrateBase(new ApplyFilterSettings(), $arr);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AssortmentFacet.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ abstract class AssortmentFacet extends intValueFacet
{
public string $typeDefinition = "";
public AssortmentFilterType $assortmentFilterType;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -22,6 +23,7 @@ public static function hydrate(array $arr)
return ProductCategoryAssortmentFacet::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = intValueFacet::hydrateBase($result, $arr);
Expand Down
2 changes: 2 additions & 0 deletions src/Models/AssortmentFacetResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ abstract class AssortmentFacetResult extends intintValueFacetResult
{
public string $typeDefinition = "";
public AssortmentFilterType $assortmentFilterType;

public static function hydrate(array $arr)
{
$type = $arr["\$type"];
Expand All @@ -22,6 +23,7 @@ public static function hydrate(array $arr)
return ProductCategoryAssortmentFacetResult::hydrate($arr);
}
}

public static function hydrateBase(mixed $result, array $arr)
{
$result = intintValueFacetResult::hydrateBase($result, $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/BatchedTrackingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static function create(Trackable ... $items) : BatchedTrackingRequest
$result->items = $items;
return $result;
}

public static function hydrate(array $arr) : BatchedTrackingRequest
{
$result = TrackingRequest::hydrateBase(new BatchedTrackingRequest(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/BoostAndBuryRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static function create(string $name, string $description, ValueSelector $
$result->multiplierSelector = $multiplierSelector;
return $result;
}

public static function hydrate(array $arr) : BoostAndBuryRule
{
$result = MerchandisingRule::hydrateBase(new BoostAndBuryRule(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/Brand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static function create(string $id) : Brand
$result->id = $id;
return $result;
}

public static function hydrate(array $arr) : Brand
{
$result = new Brand();
Expand Down
1 change: 1 addition & 0 deletions src/Models/BrandAdministrativeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static function create(?Language $language, ?Currency $currency, FilterCo
$result->kind = $kind;
return $result;
}

public static function hydrate(array $arr) : BrandAdministrativeAction
{
$result = Trackable::hydrateBase(new BrandAdministrativeAction(), $arr);
Expand Down
1 change: 1 addition & 0 deletions src/Models/BrandAssortmentFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static function create(bool $negated = false) : BrandAssortmentFilter
$result->negated = $negated;
return $result;
}

public static function hydrate(array $arr) : BrandAssortmentFilter
{
$result = Filter::hydrateBase(new BrandAssortmentFilter(), $arr);
Expand Down
Loading

0 comments on commit b83c4a0

Please sign in to comment.