1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 17:52:45 +01:00
psalm/tests/FileManipulation/RedundantCastManipulationTest.php
orklah 872f1c232c
allow Psalter to fix RedundantCast (#5948)
* allow Psalter to fix RedundantCast

* fix test
2021-06-17 18:15:45 -04:00

47 lines
1.1 KiB
PHP

<?php
namespace Psalm\Tests\FileManipulation;
class RedundantCastManipulationTest extends FileManipulationTestCase
{
/**
* @return array<string,array{string,string,string,string[],bool,5?:bool}>
*/
public function providerValidCodeParse(): array
{
return [
'RemoveRedundantCast' => [
'<?php
$test = 1;
(int)$test;
',
'<?php
$test = 1;
$test;
',
'5.6',
['RedundantCast'],
true,
],
'RemoveRedundantCastGivenDocblockType' => [
'<?php
/** @param int $test */
function a($test){
(int)$test;
}
',
'<?php
/** @param int $test */
function a($test){
$test;
}
',
'5.6',
['RedundantCastGivenDocblockType'],
true,
],
];
}
}