/*
* This file is part of Psy Shell.
*
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* @dataProvider invalidDeclarations
* @expectedException \Psy\Exception\FatalErrorException
*/
- public function testInvalidDeclarations($declaration)
+ public function testInvalidDeclarations($code)
{
- $stmts = $this->parse($declaration);
- $this->traverser->traverse($stmts);
+ $this->parseAndTraverse($code);
}
public function invalidDeclarations()
{
- return array(
- array('declare(strict_types=-1)'),
- array('declare(strict_types=2)'),
- array('declare(strict_types="foo")'),
- );
+ return [
+ ['declare(strict_types=-1)'],
+ ['declare(strict_types=2)'],
+ ['declare(strict_types="foo")'],
+ ];
}
}