Skip to content

Commit 4097c12

Browse files
committed
Add structs for new leadpage-template related methods
1 parent ae64b86 commit 4097c12

13 files changed

+635
-0
lines changed

phpstan-baseline.neon

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,76 @@ parameters:
565565
count: 1
566566
path: src/Struct/LeadPage/LeadpageArticle.php
567567

568+
-
569+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$id \\(int\\) does not accept int\\|null\\.$#"
570+
count: 1
571+
path: src/Struct/LeadPage/LeadpageSlot.php
572+
573+
-
574+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$items \\(array\\<int, Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItemInterface\\>\\) does not accept array\\<int, Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItemInterface\\>\\|null\\.$#"
575+
count: 1
576+
path: src/Struct/LeadPage/LeadpageSlot.php
577+
578+
-
579+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$name \\(string\\) does not accept string\\|null\\.$#"
580+
count: 1
581+
path: src/Struct/LeadPage/LeadpageSlot.php
582+
583+
-
584+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$slotNumber \\(int\\) does not accept int\\|null\\.$#"
585+
count: 1
586+
path: src/Struct/LeadPage/LeadpageSlot.php
587+
588+
-
589+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$sortTypeId \\(int\\) does not accept int\\|null\\.$#"
590+
count: 1
591+
path: src/Struct/LeadPage/LeadpageSlot.php
592+
593+
-
594+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlot\\:\\:\\$sortTypeValue \\(int\\) does not accept int\\|null\\.$#"
595+
count: 1
596+
path: src/Struct/LeadPage/LeadpageSlot.php
597+
598+
-
599+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotConfiguration\\:\\:\\$items \\(array\\<int, Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotInterface\\>\\) does not accept array\\<int, Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotInterface\\>\\|null\\.$#"
600+
count: 1
601+
path: src/Struct/LeadPage/LeadpageSlotConfiguration.php
602+
603+
-
604+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$articleTypeId \\(int\\) does not accept int\\|null\\.$#"
605+
count: 1
606+
path: src/Struct/LeadPage/LeadpageSlotItem.php
607+
608+
-
609+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$landingpageAllowedArticleTemplateIds \\(array\\<int, int\\>\\) does not accept array\\<int, int\\>\\|null\\.$#"
610+
count: 1
611+
path: src/Struct/LeadPage/LeadpageSlotItem.php
612+
613+
-
614+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$landingpageArticleTemplateId \\(int\\) does not accept int\\|null\\.$#"
615+
count: 1
616+
path: src/Struct/LeadPage/LeadpageSlotItem.php
617+
618+
-
619+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$webAllowedArticleTemplateIds \\(array\\<int, int\\>\\) does not accept array\\<int, int\\>\\|null\\.$#"
620+
count: 1
621+
path: src/Struct/LeadPage/LeadpageSlotItem.php
622+
623+
-
624+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPage\\\\LeadpageSlotItem\\:\\:\\$webArticleTemplateId \\(int\\) does not accept int\\|null\\.$#"
625+
count: 1
626+
path: src/Struct/LeadPage/LeadpageSlotItem.php
627+
628+
-
629+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPageTemplate\\\\LeadpageTemplateAllowedTemplates\\:\\:\\$templateIds \\(array\\<int, int\\>\\) does not accept array\\<int, int\\>\\|null\\.$#"
630+
count: 1
631+
path: src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplates.php
632+
633+
-
634+
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\LeadPageTemplate\\\\LeadpageTemplateAllowedTemplates\\:\\:\\$templateType \\(int\\) does not accept int\\|null\\.$#"
635+
count: 1
636+
path: src/Struct/LeadPageTemplate/LeadpageTemplateAllowedTemplates.php
637+
568638
-
569639
message: "#^Property Scn\\\\EvalancheSoapStruct\\\\Struct\\\\Mailing\\\\MailingArticle\\:\\:\\$articleId \\(int\\) does not accept int\\|null\\.$#"
570640
count: 1
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Scn\EvalancheSoapStruct\Struct\LeadPage;
6+
7+
/**
8+
* Represents the configuration of a slot in a leadpage
9+
*/
10+
class LeadpageSlot implements LeadpageSlotInterface
11+
{
12+
/** @var int */
13+
private $id;
14+
15+
/** @var string */
16+
private $name;
17+
18+
/** @var int */
19+
private $slotNumber;
20+
21+
/** @var int */
22+
private $sortTypeId;
23+
24+
/** @var int */
25+
private $sortTypeValue;
26+
27+
/** @var list<LeadpageSlotItemInterface> */
28+
private $items;
29+
30+
/**
31+
* @param list<LeadpageSlotItemInterface> $items
32+
*/
33+
public function __construct(
34+
int $id = null,
35+
string $name = null,
36+
int $slotNumber = null,
37+
int $sortTypeId = null,
38+
int $sortTypeValue = null,
39+
array $items = null
40+
) {
41+
$this->id = $id;
42+
$this->name = $name;
43+
$this->slotNumber = $slotNumber;
44+
$this->sortTypeId = $sortTypeId;
45+
$this->sortTypeValue = $sortTypeValue;
46+
$this->items = $items;
47+
}
48+
49+
public function getId(): int
50+
{
51+
return $this->id;
52+
}
53+
54+
public function setId(int $id): LeadpageSlotInterface
55+
{
56+
$this->id = $id;
57+
return $this;
58+
}
59+
60+
public function getName(): string
61+
{
62+
return $this->name;
63+
}
64+
65+
public function setName(string $name): LeadpageSlotInterface
66+
{
67+
$this->name = $name;
68+
return $this;
69+
}
70+
71+
public function getSlotNumber(): int
72+
{
73+
return $this->slotNumber;
74+
}
75+
76+
public function setSlotNumber(int $slotNumber): LeadpageSlotInterface
77+
{
78+
$this->slotNumber = $slotNumber;
79+
return $this;
80+
}
81+
82+
public function getSortTypeId(): int
83+
{
84+
return $this->sortTypeId;
85+
}
86+
87+
public function setSortTypeId(int $sortTypeId): LeadpageSlotInterface
88+
{
89+
$this->sortTypeId = $sortTypeId;
90+
return $this;
91+
}
92+
93+
public function getSortTypeValue(): int
94+
{
95+
return $this->sortTypeValue;
96+
}
97+
98+
public function setSortTypeValue(int $sortTypeValue): LeadpageSlotInterface
99+
{
100+
$this->sortTypeValue = $sortTypeValue;
101+
return $this;
102+
}
103+
104+
/** @inheritdoc */
105+
public function getItems(): array
106+
{
107+
return $this->items;
108+
}
109+
110+
public function setItems(array $items): LeadpageSlotInterface
111+
{
112+
$this->items = $items;
113+
return $this;
114+
}
115+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Scn\EvalancheSoapStruct\Struct\LeadPage;
6+
7+
class LeadpageSlotConfiguration implements LeadpageSlotConfigurationInterface
8+
{
9+
/** @var list<LeadpageSlotInterface> */
10+
private $items;
11+
12+
/**
13+
* @param list<LeadpageSlotInterface> $items
14+
*/
15+
public function __construct(
16+
array $items = null
17+
) {
18+
$this->items = $items;
19+
}
20+
21+
/**
22+
* @return list<LeadpageSlotInterface>
23+
*/
24+
public function getItems(): array
25+
{
26+
return $this->items;
27+
}
28+
29+
/**
30+
* @param list<LeadpageSlotInterface> $items
31+
*/
32+
public function setItems(array $items): LeadpageSlotConfigurationInterface
33+
{
34+
$this->items = $items;
35+
36+
return $this;
37+
}
38+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Scn\EvalancheSoapStruct\Struct\LeadPage;
4+
5+
use Scn\EvalancheSoapStruct\Struct\StructInterface;
6+
7+
interface LeadpageSlotConfigurationInterface extends StructInterface
8+
{
9+
/**
10+
* @return list<LeadpageSlotInterface>
11+
*/
12+
public function getItems(): array;
13+
14+
/**
15+
* @param list<LeadpageSlotInterface> $items
16+
*/
17+
public function setItems(array $items): LeadpageSlotConfigurationInterface;
18+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace Scn\EvalancheSoapStruct\Struct\LeadPage;
4+
5+
use Scn\EvalancheSoapStruct\Struct\StructInterface;
6+
7+
/**
8+
* Represents the configuration of a slot in a leadpage
9+
*/
10+
interface LeadpageSlotInterface extends StructInterface
11+
{
12+
public function getId(): int;
13+
14+
public function setId(int $id): LeadpageSlotInterface;
15+
16+
public function getName(): string;
17+
18+
public function setName(string $name): LeadpageSlotInterface;
19+
20+
public function getSlotNumber(): int;
21+
22+
public function setSlotNumber(int $slotNumber): LeadpageSlotInterface;
23+
24+
public function getSortTypeId(): int;
25+
26+
public function setSortTypeId(int $sortTypeId): LeadpageSlotInterface;
27+
28+
public function getSortTypeValue(): int;
29+
30+
public function setSortTypeValue(int $sortTypeValue): LeadpageSlotInterface;
31+
32+
/**
33+
* @return list<LeadpageSlotItemInterface>
34+
*/
35+
public function getItems(): array;
36+
37+
/**
38+
* @param list<LeadpageSlotItemInterface> $items
39+
*/
40+
public function setItems(array $items): LeadpageSlotInterface;
41+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Scn\EvalancheSoapStruct\Struct\LeadPage;
6+
7+
/**
8+
* Represents the article template configuration for a certain article type in a slot
9+
*/
10+
class LeadpageSlotItem implements LeadpageSlotItemInterface
11+
{
12+
/** @var int */
13+
private $articleTypeId;
14+
15+
/** @var int */
16+
private $landingpageArticleTemplateId;
17+
18+
/** @var int */
19+
private $webArticleTemplateId;
20+
21+
/** @var list<int> */
22+
private $landingpageAllowedArticleTemplateIds;
23+
24+
/** @var list<int> */
25+
private $webAllowedArticleTemplateIds;
26+
27+
/**
28+
* @param list<int> $landingpageAllowedArticleTemplateIds
29+
* @param list<int> $webAllowedArticleTemplateIds
30+
*/
31+
public function __construct(
32+
int $articleTypeId = null,
33+
int $landingpageArticleTemplateId = null,
34+
int $webArticleTemplateId = null,
35+
array $landingpageAllowedArticleTemplateIds = null,
36+
array $webAllowedArticleTemplateIds = null
37+
) {
38+
$this->articleTypeId = $articleTypeId;
39+
$this->landingpageArticleTemplateId = $landingpageArticleTemplateId;
40+
$this->webArticleTemplateId = $webArticleTemplateId;
41+
$this->landingpageAllowedArticleTemplateIds = $landingpageAllowedArticleTemplateIds;
42+
$this->webAllowedArticleTemplateIds = $webAllowedArticleTemplateIds;
43+
}
44+
45+
public function getArticleTypeId(): int
46+
{
47+
return $this->articleTypeId;
48+
}
49+
50+
public function setArticleTypeId(int $articleTypeId): LeadpageSlotItemInterface
51+
{
52+
$this->articleTypeId = $articleTypeId;
53+
return $this;
54+
}
55+
56+
public function getLandingpageArticleTemplateId(): int
57+
{
58+
return $this->landingpageArticleTemplateId;
59+
}
60+
61+
public function setLandingpageArticleTemplateId(int $landingpageArticleTemplateId): LeadpageSlotItemInterface
62+
{
63+
$this->landingpageArticleTemplateId = $landingpageArticleTemplateId;
64+
return $this;
65+
}
66+
67+
public function getWebArticleTemplateId(): int
68+
{
69+
return $this->webArticleTemplateId;
70+
}
71+
72+
public function setWebArticleTemplateId(int $webArticleTemplateId): LeadpageSlotItemInterface
73+
{
74+
$this->webArticleTemplateId = $webArticleTemplateId;
75+
return $this;
76+
}
77+
78+
/** @inheritdoc */
79+
public function getLandingpageAllowedArticleTemplateIds(): array
80+
{
81+
return $this->landingpageAllowedArticleTemplateIds;
82+
}
83+
84+
/** @inheritdoc */
85+
public function setLandingpageAllowedArticleTemplateIds(array $landingpageAllowedArticleTemplateIds): LeadpageSlotItemInterface
86+
{
87+
$this->landingpageAllowedArticleTemplateIds = $landingpageAllowedArticleTemplateIds;
88+
return $this;
89+
}
90+
91+
/** @inheritdoc */
92+
public function getWebAllowedArticleTemplateIds(): array
93+
{
94+
return $this->webAllowedArticleTemplateIds;
95+
}
96+
97+
/** @inheritdoc */
98+
public function setWebAllowedArticleTemplateIds(array $webAllowedArticleTemplateIds): LeadpageSlotItemInterface
99+
{
100+
$this->webAllowedArticleTemplateIds = $webAllowedArticleTemplateIds;
101+
return $this;
102+
}
103+
}

0 commit comments

Comments
 (0)