Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Oct 26, 2022
1 parent d52af59 commit d287c88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -10,6 +10,7 @@
use Psalm\Type\Atomic\TString;
use Psalm\Type\Union;

use function call_user_func;
use function count;
use function in_array;

Expand Down Expand Up @@ -56,6 +57,9 @@ public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $ev
$first_arg = $statements_source->node_data->getType($call_args[0]->value);
$second_arg = $statements_source->node_data->getType($call_args[1]->value);
if ($first_arg && $second_arg && $first_arg->isSingleLiteral() && $second_arg->isSingleLiteral()) {
/**
* @var string $replaced_string
*/
$replaced_string = call_user_func(
$function_id,
$first_arg->getSingleLiteral()->value,
Expand Down
2 changes: 2 additions & 0 deletions tests/ReturnTypeProvider/DirnameTest.php
Expand Up @@ -5,6 +5,8 @@
use Psalm\Tests\TestCase;
use Psalm\Tests\Traits\ValidCodeAnalysisTestTrait;

use function addslashes;

use const DIRECTORY_SEPARATOR;

class DirnameTest extends TestCase
Expand Down

0 comments on commit d287c88

Please sign in to comment.