Skip to content

Commit bd81cdc

Browse files
committed
Fix
1 parent 84bafe7 commit bd81cdc

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

src/Type/StrictMixedType.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ public function hasOffsetValueType(Type $offsetType): TrinaryLogic
163163

164164
public function getOffsetValueType(Type $offsetType): Type
165165
{
166-
return $this;
166+
return new ErrorType();
167167
}
168168

169169
public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = true): Type
170170
{
171-
return $this;
171+
return new ErrorType();
172172
}
173173

174174
public function isCallable(): TrinaryLogic
@@ -193,27 +193,27 @@ public function toBoolean(): BooleanType
193193

194194
public function toNumber(): Type
195195
{
196-
return $this;
196+
return new ErrorType();
197197
}
198198

199199
public function toInteger(): Type
200200
{
201-
return $this;
201+
return new ErrorType();
202202
}
203203

204204
public function toFloat(): Type
205205
{
206-
return $this;
206+
return new ErrorType();
207207
}
208208

209209
public function toString(): Type
210210
{
211-
return $this;
211+
return new ErrorType();
212212
}
213213

214214
public function toArray(): Type
215215
{
216-
return $this;
216+
return new ErrorType();
217217
}
218218

219219
public function inferTemplateTypes(Type $receivedType): TemplateTypeMap
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"message": "Parameter #1 (mixed) of echo cannot be converted to string.",
4+
"line": 15,
5+
"ignorable": true
6+
}
7+
]

0 commit comments

Comments
 (0)