public function __construct($type, Aliases $aliases)
{
if (preg_match('#^(boolean|bool|integer|int|float|string|array)$#', $type)) {
if ($type === 'bool') {
$type = 'boolean';
}
if ($type === 'int') {
$type = 'integer';
}
$this->isBasicType = true;
} else {
if (substr($type, 0, 1) === '\\') {
$type = substr($type, 1);
} else {
$type = $aliases->translate($type);
}
$this->isBasicType = false;
}
$this->type = $type;
}