Merge pull request #18227 from kamil-tekiela/fix-psalm-returns
Fix incorrect psalm-returns
This commit is contained in:
commit
98beb5b555
@ -15341,183 +15341,6 @@
|
||||
<DocblockTypeContradiction>
|
||||
<code>assertSame</code>
|
||||
</DocblockTypeContradiction>
|
||||
<InvalidReturnStatement>
|
||||
<code><![CDATA[[
|
||||
[
|
||||
'all',
|
||||
'1001',
|
||||
'grid_edit',
|
||||
$meta,
|
||||
[],
|
||||
$url_params,
|
||||
false,
|
||||
null,
|
||||
['https://www.example.com/'],
|
||||
'class="disableAjax">[BLOB - 4 B]</a>'
|
||||
. '</td>' . "\n",
|
||||
],
|
||||
[
|
||||
'noblob',
|
||||
'1001',
|
||||
'grid_edit',
|
||||
$meta,
|
||||
[],
|
||||
$url_params,
|
||||
false,
|
||||
$transformation_plugin,
|
||||
[],
|
||||
'<td class="text-start grid_edit transformed hex">'
|
||||
. '1001'
|
||||
. '</td>' . "\n",
|
||||
],
|
||||
[
|
||||
'noblob',
|
||||
null,
|
||||
'grid_edit',
|
||||
$meta2,
|
||||
[],
|
||||
$url_params,
|
||||
false,
|
||||
$transformation_plugin,
|
||||
[],
|
||||
'<td data-decimals="0"' . "\n"
|
||||
. ' data-type="string"' . "\n"
|
||||
. ' class="grid_edit null">' . "\n"
|
||||
. ' <em>NULL</em>' . "\n"
|
||||
. '</td>' . "\n",
|
||||
],
|
||||
[
|
||||
'all',
|
||||
'foo bar baz',
|
||||
'grid_edit',
|
||||
$meta2,
|
||||
[],
|
||||
$url_params,
|
||||
false,
|
||||
null,
|
||||
[],
|
||||
'<td data-decimals="0" data-type="string" '
|
||||
. 'data-originallength="11" '
|
||||
. 'class="grid_edit pre_wrap">foo bar baz</td>' . "\n",
|
||||
],
|
||||
[
|
||||
'all',
|
||||
'foo bar baz',
|
||||
'grid_edit',
|
||||
$meta2,
|
||||
[],
|
||||
$url_params,
|
||||
false,
|
||||
$transformation_plugin_external,
|
||||
[],
|
||||
'<td data-decimals="0" data-type="string" '
|
||||
. 'data-originallength="11" '
|
||||
. 'class="grid_edit text-nowrap transformed">foo bar baz</td>' . "\n",
|
||||
],
|
||||
[
|
||||
'all',
|
||||
'2020-09-20 16:35:00',
|
||||
'grid_edit',
|
||||
$meta3,
|
||||
[],
|
||||
$url_params,
|
||||
false,
|
||||
null,
|
||||
[],
|
||||
'<td data-decimals="0" data-type="datetime" '
|
||||
. 'data-originallength="19" '
|
||||
. 'class="grid_edit text-nowrap">2020-09-20 16:35:00</td>' . "\n",
|
||||
],
|
||||
]]]></code>
|
||||
<code><![CDATA[[
|
||||
[
|
||||
true,
|
||||
true,
|
||||
'BLOB',
|
||||
'1001',
|
||||
null,
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
'class="disableAjax">1001</a>',
|
||||
],
|
||||
[
|
||||
true,
|
||||
true,
|
||||
'BLOB',
|
||||
hex2bin('123456'),
|
||||
null,
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
'class="disableAjax">0x123456</a>',
|
||||
],
|
||||
[
|
||||
true,
|
||||
false,
|
||||
'BLOB',
|
||||
'1001',
|
||||
null,
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
'class="disableAjax">[BLOB - 4 B]</a>',
|
||||
],
|
||||
[
|
||||
false,
|
||||
false,
|
||||
'BINARY',
|
||||
'1001',
|
||||
$transformation_plugin,
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
'1001',
|
||||
],
|
||||
[
|
||||
false,
|
||||
true,
|
||||
'GEOMETRY',
|
||||
null,
|
||||
null,
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
'[GEOMETRY - NULL]',
|
||||
],
|
||||
]]]></code>
|
||||
</InvalidReturnStatement>
|
||||
<InvalidReturnType>
|
||||
<code>array{array{
|
||||
* bool,
|
||||
* bool,
|
||||
* string,
|
||||
* string|null,
|
||||
* TransformationsPlugin|null,
|
||||
* array|object,
|
||||
* object,
|
||||
* array,
|
||||
* bool|null,
|
||||
* string
|
||||
* }}</code>
|
||||
<code>array{array{
|
||||
* string,
|
||||
* string|null,
|
||||
* string,
|
||||
* object,
|
||||
* array,
|
||||
* array,
|
||||
* bool,
|
||||
* TransformationsPlugin|null,
|
||||
* array,
|
||||
* string
|
||||
* }}</code>
|
||||
</InvalidReturnType>
|
||||
<MixedArgument>
|
||||
<code>$output</code>
|
||||
<code>$output</code>
|
||||
|
||||
@ -466,7 +466,7 @@ class ResultsTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* @return mixed[][]
|
||||
* @psalm-return array{array{
|
||||
* @psalm-return array<array{
|
||||
* bool,
|
||||
* bool,
|
||||
* string,
|
||||
@ -475,9 +475,9 @@ class ResultsTest extends AbstractTestCase
|
||||
* array|object,
|
||||
* object,
|
||||
* array,
|
||||
* bool|null,
|
||||
* bool,
|
||||
* string
|
||||
* }}
|
||||
* }>
|
||||
*/
|
||||
public static function dataProviderForTestHandleNonPrintableContents(): array
|
||||
{
|
||||
@ -499,19 +499,19 @@ class ResultsTest extends AbstractTestCase
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
false,
|
||||
'class="disableAjax">1001</a>',
|
||||
],
|
||||
[
|
||||
true,
|
||||
true,
|
||||
'BLOB',
|
||||
hex2bin('123456'),
|
||||
(string) hex2bin('123456'),
|
||||
null,
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
false,
|
||||
'class="disableAjax">0x123456</a>',
|
||||
],
|
||||
[
|
||||
@ -523,7 +523,7 @@ class ResultsTest extends AbstractTestCase
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
false,
|
||||
'class="disableAjax">[BLOB - 4 B]</a>',
|
||||
],
|
||||
[
|
||||
@ -535,7 +535,7 @@ class ResultsTest extends AbstractTestCase
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
false,
|
||||
'1001',
|
||||
],
|
||||
[
|
||||
@ -547,7 +547,7 @@ class ResultsTest extends AbstractTestCase
|
||||
[],
|
||||
$meta,
|
||||
$url_params,
|
||||
null,
|
||||
false,
|
||||
'[GEOMETRY - NULL]',
|
||||
],
|
||||
];
|
||||
@ -561,7 +561,7 @@ class ResultsTest extends AbstractTestCase
|
||||
* @param array|object $transform_options transformation parameters
|
||||
* @param object $meta the meta-information about the field
|
||||
* @param array $url_params parameters that should go to the download link
|
||||
* @param bool|null $is_truncated the result is truncated or not
|
||||
* @param bool $is_truncated the result is truncated or not
|
||||
* @param string $output the output of this function
|
||||
*
|
||||
* @dataProvider dataProviderForTestHandleNonPrintableContents
|
||||
@ -575,7 +575,7 @@ class ResultsTest extends AbstractTestCase
|
||||
array|object $transform_options,
|
||||
object $meta,
|
||||
array $url_params,
|
||||
bool|null $is_truncated,
|
||||
bool $is_truncated,
|
||||
string $output,
|
||||
): void {
|
||||
$_SESSION['tmpval']['display_binary'] = $display_binary;
|
||||
@ -602,7 +602,7 @@ class ResultsTest extends AbstractTestCase
|
||||
|
||||
/**
|
||||
* @return mixed[][]
|
||||
* @psalm-return array{array{
|
||||
* @psalm-return array<array{
|
||||
* string,
|
||||
* string|null,
|
||||
* string,
|
||||
@ -613,7 +613,7 @@ class ResultsTest extends AbstractTestCase
|
||||
* TransformationsPlugin|null,
|
||||
* array,
|
||||
* string
|
||||
* }}
|
||||
* }>
|
||||
*/
|
||||
public static function dataProviderForTestGetDataCellForNonNumericColumns(): array
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user