mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Support ext-ds and fix offset count
This commit is contained in:
parent
dda68228f3
commit
89752b8574
@ -1517,7 +1517,19 @@ class Config
|
||||
throw new \UnexpectedValueException('Cannot locate core generic classes');
|
||||
}
|
||||
|
||||
$stub_files = array_merge([$generic_stubs_path, $generic_classes_path], $this->stub_files);
|
||||
$core_generic_files = [$generic_stubs_path, $generic_classes_path];
|
||||
|
||||
if (\extension_loaded('ds')) {
|
||||
$ext_ds_path = __DIR__ . '/Internal/Stubs/ext-ds.php';
|
||||
|
||||
if (!file_exists($ext_ds_path)) {
|
||||
throw new \UnexpectedValueException('Cannot locate core generic classes');
|
||||
}
|
||||
|
||||
$core_generic_files[] = $ext_ds_path;
|
||||
}
|
||||
|
||||
$stub_files = array_merge($core_generic_files, $this->stub_files);
|
||||
|
||||
$phpstorm_meta_path = $this->base_dir . DIRECTORY_SEPARATOR . '.phpstorm.meta.php';
|
||||
|
||||
|
@ -261,7 +261,7 @@ class ReturnTypeCollector
|
||||
switch (count($type->type_params)) {
|
||||
case 1:
|
||||
$key_type_param = Type::getMixed();
|
||||
$value_type_param = $type->type_params[1];
|
||||
$value_type_param = $type->type_params[0];
|
||||
break;
|
||||
|
||||
default:
|
||||
|
1869
src/Psalm/Internal/Stubs/ext-ds.php
Normal file
1869
src/Psalm/Internal/Stubs/ext-ds.php
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user