create(ParserFactory::PREFER_PHP7); $config = \Psalm\Config::getInstance(); $config->throw_exception = true; $config->use_docblock_types = true; } public function setUp() { \Psalm\Checker\FileChecker::clearCache(); } public function testImplicitIntArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array', (string) $context->vars_in_scope['foo']); } public function testImplicit2DIntArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array>', (string) $context->vars_in_scope['foo']); } public function testImplicit3DIntArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array>>', (string) $context->vars_in_scope['foo']); } public function testImplicit4DIntArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array>>>', (string) $context->vars_in_scope['foo']); } public function testImplicitStringArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array', (string) $context->vars_in_scope['foo']); } public function testImplicit2DStringArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array>', (string) $context->vars_in_scope['foo']); } public function testImplicit3DStringArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array>>', (string) $context->vars_in_scope['foo']); } public function testImplicit4DStringArrayCreation() { $stmts = self::$_parser->parse('check(true, true, $context); $this->assertEquals('array>>>', (string) $context->vars_in_scope['foo']); } }