You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -150,9 +152,10 @@ public function getName(): ?string
150
152
}
151
153
152
154
153
-
/** @deprecated */
155
+
/** @deprecated use setType('class') or create using ClassType::class() */
154
156
publicfunctionsetClass(): static
155
157
{
158
+
trigger_error(__METHOD__ . "() is deprecated, use setType('class').", E_USER_DEPRECATED);
156
159
$this->type = self::TYPE_CLASS;
157
160
return$this;
158
161
}
@@ -164,8 +167,10 @@ public function isClass(): bool
164
167
}
165
168
166
169
170
+
/** @deprecated use setType('interface') or create using ClassType::interface() */
167
171
publicfunctionsetInterface(): static
168
172
{
173
+
trigger_error(__METHOD__ . '() is deprecated, use $class->setType($class::TYPE_INTERFACE) or create object using ClassType::interface()', E_USER_DEPRECATED);
169
174
$this->type = self::TYPE_INTERFACE;
170
175
return$this;
171
176
}
@@ -177,8 +182,10 @@ public function isInterface(): bool
177
182
}
178
183
179
184
185
+
/** @deprecated use setType('trait') or create using ClassType::trait() */
180
186
publicfunctionsetTrait(): static
181
187
{
188
+
trigger_error(__METHOD__ . '() is deprecated, use $class->setType($class::TYPE_TRAIT) or create object using ClassType::trait()', E_USER_DEPRECATED);
0 commit comments