mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Allow namespaced use of optional callable params
This commit is contained in:
parent
8bcb3a76e7
commit
3497ad4765
@ -766,7 +766,9 @@ abstract class Type
|
||||
|
||||
if (in_array(
|
||||
$string_type_token,
|
||||
['<', '>', '|', '?', ',', '{', '}', ':', '::', '[', ']', '(', ')', '&'],
|
||||
[
|
||||
'<', '>', '|', '?', ',', '{', '}', ':', '::', '[', ']', '(', ')', '&', '=', '...'
|
||||
],
|
||||
true
|
||||
)) {
|
||||
continue;
|
||||
|
@ -11,7 +11,24 @@ class TypeParseTest extends TestCase
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
//pae::setUp();
|
||||
$this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider();
|
||||
|
||||
$config = new TestConfig();
|
||||
|
||||
$providers = new \Psalm\Internal\Provider\Providers(
|
||||
$this->file_provider,
|
||||
new \Psalm\Tests\Internal\Provider\FakeParserCacheProvider()
|
||||
);
|
||||
|
||||
$this->project_analyzer = new \Psalm\Internal\Analyzer\ProjectAnalyzer(
|
||||
$config,
|
||||
$providers,
|
||||
false,
|
||||
true,
|
||||
\Psalm\Internal\Analyzer\ProjectAnalyzer::TYPE_CONSOLE,
|
||||
1,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user