Skip to content

Commit 6811738

Browse files
committed
Deprecated erroneous methods in FormStatistic
Several methods in FormStatistic are not supposed to work as they provide extended resource information we dont' provide via api. Add some sane defaults and deprecate the methods so we can remove them within the next major update. Also update the docs
1 parent d7e4035 commit 6811738

File tree

3 files changed

+55
-13
lines changed

3 files changed

+55
-13
lines changed

docs/index.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ MailingConfiguration(
317317
string <salutationCompany>
318318
string <salutationFamily>
319319
string <salutationOther>
320+
string <salutationDivers>
320321
string <senderEmail>
321322
string <senderName>
322323
string <replyName>
@@ -588,20 +589,45 @@ SmartLink(
588589
```
589590
##### SmartLinkConfiguration
590591
Represents a smart link configuration element.<br>
591-
592+
592593
```
593594
SmartLinkConfiguration(
594595
int <id>
595596
string <targetUrl>
596597
bool <individualScoringConfig>
597-
int restrictionTargetGroupId
598-
array restrictionUserAgents
599-
int milestoneId
600-
bool activateRedirect
601-
bool activateProfileUpdate
602-
bool activateTracking
603-
array(SmartLinkScoringConfiguration) scoringConfigs
604-
array(SmartLinkPoolConfiguration) poolAttributes
598+
int <restrictionTargetGroupId>
599+
array <restrictionUserAgents>
600+
int <milestoneId>
601+
bool <activateRedirect>
602+
bool <activateProfileUpdate>
603+
bool <activateTracking>
604+
array <scoringConfigs>
605+
array <poolAttributes>
606+
)
607+
```
608+
##### SmartLinkPoolConfiguration
609+
Represents a smart link pool configuration element.<br>
610+
611+
```
612+
SmartLinkPoolConfiguration(
613+
int <id>
614+
int <poolId>
615+
int <poolAttributeId>
616+
string <value>
617+
bool <isMerge>
618+
)
619+
```
620+
##### SmartLinkScoringConfiguration
621+
Represents a smart link scoring configuration element.<br>
622+
623+
```
624+
SmartLinkScoringConfiguration(
625+
int <id>
626+
string <name>
627+
int <value>
628+
int <multipleScoreTimeThreshold>
629+
int <scoringGroupId>
630+
int <type>
605631
)
606632
```
607633
### Statistic

src/Struct/Statistic/FormStatistic.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,34 +142,42 @@ public function getName(): string
142142

143143
/**
144144
* @return string
145+
*
146+
* @deprecated Not supported in specialized method, please use `getById`
145147
*/
146148
public function getUrl(): string
147149
{
148-
return $this->url;
150+
return (string) $this->url;
149151
}
150152

151153
/**
152154
* @return int
155+
*
156+
* @deprecated Not supported in specialized method, please use `getById`
153157
*/
154158
public function getTypeId(): int
155159
{
156-
return $this->typeId;
160+
return (int) $this->typeId;
157161
}
158162

159163
/**
160164
* @return int
165+
*
166+
* @deprecated Not supported in specialized method, please use `getById`
161167
*/
162168
public function getFolderId(): int
163169
{
164-
return $this->folderId;
170+
return (int) $this->folderId;
165171
}
166172

167173
/**
168174
* @return int
175+
*
176+
* @deprecated Not supported in specialized method, please use `getById`
169177
*/
170178
public function getMandatorId(): int
171179
{
172-
return $this->mandatorId;
180+
return (int) $this->mandatorId;
173181
}
174182

175183
/**

src/Struct/Statistic/FormStatisticInterface.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,29 @@ public function getName(): string;
2323

2424
/**
2525
* @return string
26+
*
27+
* @deprecated Not supported in specialized method, please use `getById`
2628
*/
2729
public function getUrl(): string;
2830

2931
/**
3032
* @return int
33+
*
34+
* @deprecated Not supported in specialized method, please use `getById`
3135
*/
3236
public function getTypeId(): int;
3337

3438
/**
3539
* @return int
40+
*
41+
* @deprecated Not supported in specialized method, please use `getById`
3642
*/
3743
public function getFolderId(): int;
3844

3945
/**
4046
* @return int
47+
*
48+
* @deprecated Not supported in specialized method, please use `getById`
4149
*/
4250
public function getMandatorId(): int;
4351

0 commit comments

Comments
 (0)