1 | <?php |
||
23 | trait SiteTrait |
||
24 | { |
||
25 | /** |
||
26 | * An array of related sites. |
||
27 | * |
||
28 | * @var array<\BenatEspina\StackExchangeApiClient\Model\Interfaces\RelatedSiteInterface>|null |
||
29 | */ |
||
30 | protected $relatedSites = []; |
||
31 | |||
32 | /** |
||
33 | * Site state that can be 'normal', 'closed_beta', 'open_beta', or 'linked_meta'. |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $siteState; |
||
38 | |||
39 | /** |
||
40 | * Site type that can be 'main_site' or 'meta_site'. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $siteType; |
||
45 | |||
46 | /** |
||
47 | * Site url. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $siteUrl; |
||
52 | |||
53 | /** |
||
54 | * Adds related site. |
||
55 | * |
||
56 | * @param \Benatespina\StackExchangeApiClient\Model\Interfaces\RelatedSiteInterface $relatedSite The related site |
||
57 | * |
||
58 | * @return $this self Object |
||
59 | */ |
||
60 | public function addRelatedSite(RelatedSiteInterface $relatedSite) |
||
66 | |||
67 | /** |
||
68 | * Removes related site. |
||
69 | * |
||
70 | * @param \Benatespina\StackExchangeApiClient\Model\Interfaces\RelatedSiteInterface $relatedSite The related site |
||
71 | * |
||
72 | * @return $this self Object |
||
73 | */ |
||
74 | public function removeRelatedSite(RelatedSiteInterface $relatedSite) |
||
80 | |||
81 | /** |
||
82 | * Gets array of related sites. |
||
83 | * |
||
84 | * @return array<\Benatespina\StackExchangeApiClient\Model\Interfaces\RelatedSiteInterface>|null |
||
85 | */ |
||
86 | public function getRelatedSites() |
||
90 | |||
91 | /** |
||
92 | * Sets site state. |
||
93 | * |
||
94 | * @param string $siteState The site state that can be 'normal', 'closed_beta', 'open_beta', or 'linked_meta' |
||
95 | * |
||
96 | * @return $this self Object |
||
97 | */ |
||
98 | public function setSiteState($siteState) |
||
109 | |||
110 | /** |
||
111 | * Gets site state. |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public function getSiteState() |
||
119 | |||
120 | /** |
||
121 | * Sets site type. |
||
122 | * |
||
123 | * @param string $siteType The site state that can be 'main_site' or 'meta_site' |
||
124 | * |
||
125 | * @return $this self Object |
||
126 | */ |
||
127 | public function setSiteType($siteType) |
||
135 | |||
136 | /** |
||
137 | * Gets site type. |
||
138 | * |
||
139 | * @return string |
||
140 | */ |
||
141 | public function getSiteType() |
||
145 | |||
146 | /** |
||
147 | * Sets site url. |
||
148 | * |
||
149 | * @param string $siteUrl The site url |
||
150 | * |
||
151 | * @return $this self Object |
||
152 | */ |
||
153 | public function setSiteUrl($siteUrl) |
||
159 | |||
160 | /** |
||
161 | * Gets site name. |
||
162 | * |
||
163 | * @return string |
||
164 | */ |
||
165 | public function getSiteUrl() |
||
169 | |||
170 | /** |
||
171 | * Loads the variables if the data exist into resource. It works like a constructor. |
||
172 | * |
||
173 | * @param null|mixed[] $resource The resource |
||
174 | * @param string[] $stateConstants The array of site state constants |
||
175 | * @param string[] $typeConstants The array of site type constants |
||
176 | */ |
||
177 | protected function loadSite($resource, $stateConstants, $typeConstants) |
||
187 | } |
||
188 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..