Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jan 25, 2025
1 parent 6ae41e1 commit 8d73757
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions tests/Internal/Codebase/InternalCallMapHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ class InternalCallMapHandlerTest extends TestCase
private static array $ignoredFunctions = [
'array_multisort',
'datefmt_create' => ['8.0'],
'fiber::start',
'get_class' => ['8.3', '8.4'],
'get_parent_class' => ['8.3', '8.4'],
'imagefilledpolygon',
'imagegd',
'imagegd2',
'imageopenpolygon',
'imagepolygon',
'intlgregoriancalendar::__construct',
'lzf_compress',
'lzf_decompress',
'mailparse_msg_extract_part',
Expand All @@ -100,7 +98,6 @@ class InternalCallMapHandlerTest extends TestCase
'mailparse_msg_get_structure',
'mailparse_msg_parse',
'mailparse_stream_encode',
'mb_check_encoding' => ['8.1', '8.2', '8.3', '8.4'],
'memcached::cas', // memcached 3.2.0 has incorrect reflection
'memcached::casbykey', // memcached 3.2.0 has incorrect reflection
'oauth::fetch',
Expand Down Expand Up @@ -178,6 +175,17 @@ class InternalCallMapHandlerTest extends TestCase
* @var array<int|string, string|list<string>>
*/
private static array $ignoredReturnTypeOnlyFunctions = [
'datetime::add' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::modify' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::createfromformat' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::createfromimmutable' => ['8.1'],
'datetime::createfrominterface',
'datetime::setdate' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::setisodate' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::settime' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::settimestamp' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::settimezone' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
'datetime::sub' => ['8.1', '8.2', '8.3'], // DateTime does not contain static
];

/**
Expand Down Expand Up @@ -270,7 +278,7 @@ public function testGetCallablesFromCallmapRemovesRwPrefixFromParameterNames():
$collator_sort_entry = $entries[0];
$this->assertIsArray($collator_sort_entry->params);
$this->assertArrayHasKey(1, $collator_sort_entry->params);
$this->assertEquals('array', $collator_sort_entry->params[1]->name);
$this->assertEquals('arr', $collator_sort_entry->params[1]->name);
}

public function testGetCallablesFromCallmapRemovesWPrefixFromParameterNames(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/MethodCallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ function fetch_named() : array {
],
'dateTimeSecondArg' => [
'code' => '<?php
$date = new DateTime(null, new DateTimeZone("Pacific/Nauru"));
$date = new DateTime("now", new DateTimeZone("Pacific/Nauru"));
echo $date->format("Y-m-d H:i:sP") . "\n";',
],
'noCrashOnGetClassMethodCallWithNull' => [
Expand Down

0 comments on commit 8d73757

Please sign in to comment.