Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

namespace Rector\Tests\TypeDeclarationDocblocks\Rector\Class_\AddReturnDocblockDataProviderRector\Fixture;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

final class OverrideDummyMixed extends TestCase
{
#[DataProvider('provideData')]
public function testSomething()
{
}

/**
* @return mixed
*/
public static function provideData()
{
return [
[125, 35],
[1252]
];
}
}

?>
-----
<?php

namespace Rector\Tests\TypeDeclarationDocblocks\Rector\Class_\AddReturnDocblockDataProviderRector\Fixture;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

final class OverrideDummyMixed extends TestCase
{
#[DataProvider('provideData')]
public function testSomething()
{
}

/**
* @return int[][]
*/
public static function provideData()
{
return [
[125, 35],
[1252]
];
}
}

?>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public function isUsefulArrayTag(null|ReturnTagValueNode|ParamTagValueNode|VarTa
return true;
}

return $type->name !== 'array';
return ! in_array($type->name, ['array', 'mixed'], true);
}
}