1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Strip leading slashes from generic object classes on creation

This commit is contained in:
Matthew Brown 2017-12-31 21:17:39 -05:00
parent 38e48a8c1c
commit 1608463b09

View File

@ -11,6 +11,9 @@ class TGenericObject extends TNamedObject implements Generic
*/
public function __construct($value, array $type_params)
{
if ($value[0] === '\\') {
$value = substr($value, 1);
}
$this->value = $value;
$this->type_params = $type_params;
}