diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4c39dd0..732f3b5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -565,6 +565,76 @@ parameters: count: 1 path: src/Struct/LeadPage/LeadpageArticle.php + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$id \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlot.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$items \\(array\\\\) does not accept array\\\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlot.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$name \\(string\\) does not accept string\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlot.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$slotNumber \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlot.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$sortTypeId \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlot.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$sortTypeValue \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlot.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotConfiguration\\:\\:\\$items \\(array\\\\) does not accept array\\\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlotConfiguration.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$articleTypeId \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlotItem.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$landingpageAllowedArticleTemplateIds \\(array\\\\) does not accept array\\\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlotItem.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$landingpageArticleTemplateId \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlotItem.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$webAllowedArticleTemplateIds \\(array\\\\) does not accept array\\\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlotItem.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$webArticleTemplateId \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPage/LeadpageSlotItem.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPageTemplate\\\\LeadpageTemplateAllowedTemplates\\:\\:\\$templateIds \\(array\\\\) does not accept array\\\\|null\\.$#" + count: 1 + path: src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplates.php + + - + message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPageTemplate\\\\LeadpageTemplateAllowedTemplates\\:\\:\\$templateType \\(int\\) does not accept int\\|null\\.$#" + count: 1 + path: src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplates.php + - message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\Mailing\\\\MailingArticle\\:\\:\\$articleId \\(int\\) does not accept int\\|null\\.$#" count: 1 diff --git a/src/Struct/LeadPage/LeadpageSlot.php b/src/Struct/LeadPage/LeadpageSlot.php new file mode 100644 index 0000000..5558cac --- /dev/null +++ b/src/Struct/LeadPage/LeadpageSlot.php @@ -0,0 +1,115 @@ + */ + private $items; + + /** + * @param list $items + */ + public function __construct( + int $id = null, + string $name = null, + int $slotNumber = null, + int $sortTypeId = null, + int $sortTypeValue = null, + array $items = null + ) { + $this->id = $id; + $this->name = $name; + $this->slotNumber = $slotNumber; + $this->sortTypeId = $sortTypeId; + $this->sortTypeValue = $sortTypeValue; + $this->items = $items; + } + + public function getId(): int + { + return $this->id; + } + + public function setId(int $id): LeadpageSlotInterface + { + $this->id = $id; + return $this; + } + + public function getName(): string + { + return $this->name; + } + + public function setName(string $name): LeadpageSlotInterface + { + $this->name = $name; + return $this; + } + + public function getSlotNumber(): int + { + return $this->slotNumber; + } + + public function setSlotNumber(int $slotNumber): LeadpageSlotInterface + { + $this->slotNumber = $slotNumber; + return $this; + } + + public function getSortTypeId(): int + { + return $this->sortTypeId; + } + + public function setSortTypeId(int $sortTypeId): LeadpageSlotInterface + { + $this->sortTypeId = $sortTypeId; + return $this; + } + + public function getSortTypeValue(): int + { + return $this->sortTypeValue; + } + + public function setSortTypeValue(int $sortTypeValue): LeadpageSlotInterface + { + $this->sortTypeValue = $sortTypeValue; + return $this; + } + + /** @inheritdoc */ + public function getItems(): array + { + return $this->items; + } + + public function setItems(array $items): LeadpageSlotInterface + { + $this->items = $items; + return $this; + } +} diff --git a/src/Struct/LeadPage/LeadpageSlotConfiguration.php b/src/Struct/LeadPage/LeadpageSlotConfiguration.php new file mode 100644 index 0000000..566faa2 --- /dev/null +++ b/src/Struct/LeadPage/LeadpageSlotConfiguration.php @@ -0,0 +1,38 @@ + */ + private $items; + + /** + * @param list $items + */ + public function __construct( + array $items = null + ) { + $this->items = $items; + } + + /** + * @return list + */ + public function getItems(): array + { + return $this->items; + } + + /** + * @param list $items + */ + public function setItems(array $items): LeadpageSlotConfigurationInterface + { + $this->items = $items; + + return $this; + } +} diff --git a/src/Struct/LeadPage/LeadpageSlotConfigurationInterface.php b/src/Struct/LeadPage/LeadpageSlotConfigurationInterface.php new file mode 100644 index 0000000..74ffd0b --- /dev/null +++ b/src/Struct/LeadPage/LeadpageSlotConfigurationInterface.php @@ -0,0 +1,18 @@ + + */ + public function getItems(): array; + + /** + * @param list $items + */ + public function setItems(array $items): LeadpageSlotConfigurationInterface; +} diff --git a/src/Struct/LeadPage/LeadpageSlotInterface.php b/src/Struct/LeadPage/LeadpageSlotInterface.php new file mode 100644 index 0000000..5d95ffe --- /dev/null +++ b/src/Struct/LeadPage/LeadpageSlotInterface.php @@ -0,0 +1,41 @@ + + */ + public function getItems(): array; + + /** + * @param list $items + */ + public function setItems(array $items): LeadpageSlotInterface; +} diff --git a/src/Struct/LeadPage/LeadpageSlotItem.php b/src/Struct/LeadPage/LeadpageSlotItem.php new file mode 100644 index 0000000..55c2d8e --- /dev/null +++ b/src/Struct/LeadPage/LeadpageSlotItem.php @@ -0,0 +1,103 @@ + */ + private $landingpageAllowedArticleTemplateIds; + + /** @var list */ + private $webAllowedArticleTemplateIds; + + /** + * @param list $landingpageAllowedArticleTemplateIds + * @param list $webAllowedArticleTemplateIds + */ + public function __construct( + int $articleTypeId = null, + int $landingpageArticleTemplateId = null, + int $webArticleTemplateId = null, + array $landingpageAllowedArticleTemplateIds = null, + array $webAllowedArticleTemplateIds = null + ) { + $this->articleTypeId = $articleTypeId; + $this->landingpageArticleTemplateId = $landingpageArticleTemplateId; + $this->webArticleTemplateId = $webArticleTemplateId; + $this->landingpageAllowedArticleTemplateIds = $landingpageAllowedArticleTemplateIds; + $this->webAllowedArticleTemplateIds = $webAllowedArticleTemplateIds; + } + + public function getArticleTypeId(): int + { + return $this->articleTypeId; + } + + public function setArticleTypeId(int $articleTypeId): LeadpageSlotItemInterface + { + $this->articleTypeId = $articleTypeId; + return $this; + } + + public function getLandingpageArticleTemplateId(): int + { + return $this->landingpageArticleTemplateId; + } + + public function setLandingpageArticleTemplateId(int $landingpageArticleTemplateId): LeadpageSlotItemInterface + { + $this->landingpageArticleTemplateId = $landingpageArticleTemplateId; + return $this; + } + + public function getWebArticleTemplateId(): int + { + return $this->webArticleTemplateId; + } + + public function setWebArticleTemplateId(int $webArticleTemplateId): LeadpageSlotItemInterface + { + $this->webArticleTemplateId = $webArticleTemplateId; + return $this; + } + + /** @inheritdoc */ + public function getLandingpageAllowedArticleTemplateIds(): array + { + return $this->landingpageAllowedArticleTemplateIds; + } + + /** @inheritdoc */ + public function setLandingpageAllowedArticleTemplateIds(array $landingpageAllowedArticleTemplateIds): LeadpageSlotItemInterface + { + $this->landingpageAllowedArticleTemplateIds = $landingpageAllowedArticleTemplateIds; + return $this; + } + + /** @inheritdoc */ + public function getWebAllowedArticleTemplateIds(): array + { + return $this->webAllowedArticleTemplateIds; + } + + /** @inheritdoc */ + public function setWebAllowedArticleTemplateIds(array $webAllowedArticleTemplateIds): LeadpageSlotItemInterface + { + $this->webAllowedArticleTemplateIds = $webAllowedArticleTemplateIds; + return $this; + } +} diff --git a/src/Struct/LeadPage/LeadpageSlotItemInterface.php b/src/Struct/LeadPage/LeadpageSlotItemInterface.php new file mode 100644 index 0000000..d526a6a --- /dev/null +++ b/src/Struct/LeadPage/LeadpageSlotItemInterface.php @@ -0,0 +1,43 @@ + + */ + public function getLandingpageAllowedArticleTemplateIds(): array; + + /** + * @param list $landingpageAllowedArticleTemplateIds + */ + public function setLandingpageAllowedArticleTemplateIds(array $landingpageAllowedArticleTemplateIds): LeadpageSlotItemInterface; + + /** + * @return list + */ + public function getWebAllowedArticleTemplateIds(): array; + + /** + * @param list $webAllowedArticleTemplateIds + */ + public function setWebAllowedArticleTemplateIds(array $webAllowedArticleTemplateIds): LeadpageSlotItemInterface; +} diff --git a/src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplates.php b/src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplates.php new file mode 100644 index 0000000..a76b8e0 --- /dev/null +++ b/src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplates.php @@ -0,0 +1,54 @@ + */ + private $templateIds; + + /** + * @param list $templateIds + */ + public function __construct( + int $templateType = null, + array $templateIds = null + ) { + $this->templateType = $templateType; + $this->templateIds = $templateIds; + } + + public function getTemplateType(): int + { + return $this->templateType; + } + + public function setTemplateType(int $templateType): LeadpageTemplateAllowedTemplatesInterface + { + $this->templateType = $templateType; + + return $this; + } + + /** @inheritdoc */ + public function getTemplateIds(): array + { + return $this->templateIds; + } + + /** @inheritdoc */ + public function setTemplateIds(array $templateIds): LeadpageTemplateAllowedTemplatesInterface + { + $this->templateIds = $templateIds; + + return $this; + } +} diff --git a/src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplatesInterface.php b/src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplatesInterface.php new file mode 100644 index 0000000..33a05ef --- /dev/null +++ b/src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplatesInterface.php @@ -0,0 +1,25 @@ + + */ + public function getTemplateIds(): array; + + /** + * @param list $templateIds + */ + public function setTemplateIds(array $templateIds): LeadpageTemplateAllowedTemplatesInterface; +} diff --git a/tests/Struct/LeadPage/LeadpageSlotConfigurationTest.php b/tests/Struct/LeadPage/LeadpageSlotConfigurationTest.php new file mode 100644 index 0000000..e2a1346 --- /dev/null +++ b/tests/Struct/LeadPage/LeadpageSlotConfigurationTest.php @@ -0,0 +1,30 @@ +subject = new LeadpageSlotConfiguration(); + } + + public static function methodDataProvider(): array + { + return [ + ['Items', 'array'], + ]; + } + + protected function getSubject() + { + return $this->subject; + } +} diff --git a/tests/Struct/LeadPage/LeadpageSlotItemTest.php b/tests/Struct/LeadPage/LeadpageSlotItemTest.php new file mode 100644 index 0000000..c65a0fb --- /dev/null +++ b/tests/Struct/LeadPage/LeadpageSlotItemTest.php @@ -0,0 +1,32 @@ +subject = new LeadpageSlotItem(); + } + + public static function methodDataProvider(): array + { + return [ + ['ArticleTypeId', 'int'], + ['LandingpageArticleTemplateId', 'int'], + ['WebArticleTemplateId', 'int'], + ['LandingpageAllowedArticleTemplateIds', 'array'], + ['WebAllowedArticleTemplateIds', 'array'], + ]; + } + + protected function getSubject() + { + return $this->subject; + } +} diff --git a/tests/Struct/LeadPage/LeadpageSlotTest.php b/tests/Struct/LeadPage/LeadpageSlotTest.php new file mode 100644 index 0000000..f130b4e --- /dev/null +++ b/tests/Struct/LeadPage/LeadpageSlotTest.php @@ -0,0 +1,35 @@ +subject = new LeadpageSlot(); + } + + public static function methodDataProvider(): array + { + return [ + ['Id', 'int'], + ['Name', 'string'], + ['SlotNumber', 'int'], + ['SortTypeId', 'int'], + ['SortTypeValue', 'int'], + ['Items', 'array'] + ]; + } + + protected function getSubject() + { + return $this->subject; + } +} diff --git a/tests/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplatesTest.php b/tests/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplatesTest.php new file mode 100644 index 0000000..0e7ac45 --- /dev/null +++ b/tests/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplatesTest.php @@ -0,0 +1,31 @@ +subject = new LeadpageTemplateAllowedTemplates(); + } + + public static function methodDataProvider(): array + { + return [ + ['TemplateType', 'int'], + ['TemplateIds', 'array'] + ]; + } + + protected function getSubject() + { + return $this->subject; + } +}