mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 13:51:54 +01:00
Fix codestyle erors in InternalCallMapHandlerTest
This commit is contained in:
parent
e28cd128db
commit
31bee0c845
@ -2,11 +2,9 @@
|
|||||||
|
|
||||||
namespace Psalm\Tests\Internal\Codebase;
|
namespace Psalm\Tests\Internal\Codebase;
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use PHPUnit\Framework\AssertionFailedError;
|
use PHPUnit\Framework\AssertionFailedError;
|
||||||
use PHPUnit\Framework\ExpectationFailedException;
|
use PHPUnit\Framework\ExpectationFailedException;
|
||||||
use PHPUnit\Framework\SkippedTestError;
|
|
||||||
use Psalm\Codebase;
|
use Psalm\Codebase;
|
||||||
use Psalm\Internal\Analyzer\ProjectAnalyzer;
|
use Psalm\Internal\Analyzer\ProjectAnalyzer;
|
||||||
use Psalm\Internal\Codebase\InternalCallMapHandler;
|
use Psalm\Internal\Codebase\InternalCallMapHandler;
|
||||||
@ -18,11 +16,11 @@ use Psalm\Tests\Internal\Provider\FakeParserCacheProvider;
|
|||||||
use Psalm\Tests\TestCase;
|
use Psalm\Tests\TestCase;
|
||||||
use Psalm\Tests\TestConfig;
|
use Psalm\Tests\TestConfig;
|
||||||
use Psalm\Type;
|
use Psalm\Type;
|
||||||
use ReflectionException;
|
|
||||||
use ReflectionFunction;
|
use ReflectionFunction;
|
||||||
use ReflectionParameter;
|
use ReflectionParameter;
|
||||||
use ReflectionType;
|
use ReflectionType;
|
||||||
|
|
||||||
|
use function array_shift;
|
||||||
use function class_exists;
|
use function class_exists;
|
||||||
use function count;
|
use function count;
|
||||||
use function explode;
|
use function explode;
|
||||||
@ -37,9 +35,11 @@ use function strcmp;
|
|||||||
use function strncmp;
|
use function strncmp;
|
||||||
use function strpos;
|
use function strpos;
|
||||||
use function substr;
|
use function substr;
|
||||||
|
use function version_compare;
|
||||||
|
|
||||||
use const PHP_MAJOR_VERSION;
|
use const PHP_MAJOR_VERSION;
|
||||||
use const PHP_MINOR_VERSION;
|
use const PHP_MINOR_VERSION;
|
||||||
|
use const PHP_VERSION;
|
||||||
|
|
||||||
class InternalCallMapHandlerTest extends TestCase
|
class InternalCallMapHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
@ -761,7 +761,7 @@ class InternalCallMapHandlerTest extends TestCase
|
|||||||
public function assertEntryReturnType(ReflectionFunction $function, string $entryReturnType): void
|
public function assertEntryReturnType(ReflectionFunction $function, string $entryReturnType): void
|
||||||
{
|
{
|
||||||
if (version_compare(PHP_VERSION, '8.1.0', '>=')) {
|
if (version_compare(PHP_VERSION, '8.1.0', '>=')) {
|
||||||
/** @var \ReflectionType|null $expectedType */
|
/** @var ReflectionType|null $expectedType */
|
||||||
$expectedType = $function->hasTentativeReturnType() ? $function->getTentativeReturnType() : $function->getReturnType();
|
$expectedType = $function->hasTentativeReturnType() ? $function->getTentativeReturnType() : $function->getReturnType();
|
||||||
} else {
|
} else {
|
||||||
$expectedType = $function->getReturnType();
|
$expectedType = $function->getReturnType();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user