Skip to content

Commit

Permalink
Fixed psalm-check-type-exact
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Jan 27, 2024
1 parent cbe6180 commit f6b2764
Show file tree
Hide file tree
Showing 53 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion tests/psalm/ArrayKeyType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(ArrayKeyType::type);
/** @psalm-check-type-exact $_type = array-key */
/** @psalm-check-type-exact $_type = \array-key */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ArrayShapeType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new ArrayShapeType());
/** @psalm-check-type-exact $_type = array */
/** @psalm-check-type-exact $_type = \array */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ArrayType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new ArrayType());
/** @psalm-check-type-exact $_type = array */
/** @psalm-check-type-exact $_type = \array */

new ArrayType(ObjectType::type, ObjectType::type);

Expand Down
2 changes: 1 addition & 1 deletion tests/psalm/BoolType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(BoolType::type);
/** @psalm-check-type-exact $_type = bool */
/** @psalm-check-type-exact $_type = \bool */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/CallableArrayType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(CallableArrayType::type);
/** @psalm-check-type-exact $_type = callable-array */
/** @psalm-check-type-exact $_type = \callable-array */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/CallableStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(CallableStringType::type);
/** @psalm-check-type-exact $_type = callable-string */
/** @psalm-check-type-exact $_type = \callable-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/CallableType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new CallableType());
/** @psalm-check-type-exact $_type = callable(): mixed */
/** @psalm-check-type-exact $_type = \callable(): mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ClassConstantType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new ClassConstantType(\RecursiveIteratorIterator::class, 'LEAVES_ONLY'));
/** @psalm-check-type-exact $_type = mixed */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ClassStringLiteralType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new ClassStringLiteralType(\stdClass::class));
/** @psalm-check-type-exact $_type = stdClass::class */
/** @psalm-check-type-exact $_type = \stdClass::class */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ClassStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(ClassStringType::type);
/** @psalm-check-type-exact $_type = class-string */
/** @psalm-check-type-exact $_type = \class-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ClosedResourceType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(ClosedResourceType::type);
/** @psalm-check-type-exact $_type = closed-resource */
/** @psalm-check-type-exact $_type = \closed-resource */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ConditionalType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ $_type = PsalmTest::extractType(new ConditionalType(
then: StringType::type,
else: NullType::type,
));
/** @psalm-check-type-exact $_type = mixed */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ConstantType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new ConstantType('PHP_MAJOR_VERSION'));
/** @psalm-check-type-exact $_type = mixed */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/EnumStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(EnumStringType::type);
/** @psalm-check-type-exact $_type = enum-string */
/** @psalm-check-type-exact $_type = \enum-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/FalseType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(FalseType::type);
/** @psalm-check-type-exact $_type = false */
/** @psalm-check-type-exact $_type = \false */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/FloatLiteralType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new FloatLiteralType(0.5));
/** @psalm-check-type-exact $_type = 0.5 */
/** @psalm-check-type-exact $_type = \0.5 */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/FloatType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(FloatType::type);
/** @psalm-check-type-exact $_type = float */
/** @psalm-check-type-exact $_type = \float */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/IntLiteralType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new IntLiteralType(123));
/** @psalm-check-type-exact $_type = 123 */
/** @psalm-check-type-exact $_type = \123 */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/IntMaskOfType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class X
*/
function testItPreservesPassedType(Type $constantType): void
{
/** @psalm-check-type-exact $_type = 1|2|4 */
/** @psalm-check-type-exact $_type = \1|2|4 */
$_type = PsalmTest::extractType(new IntMaskOfType($constantType));
}

Expand Down
2 changes: 1 addition & 1 deletion tests/psalm/IntMaskType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new IntMaskType([1, 2, 4]));
/** @psalm-check-type-exact $_type = int<0, max> */
/** @psalm-check-type-exact $_type = \int<0, max> */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/IntRangeType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new IntRangeType());
/** @psalm-check-type-exact $_type = int */
/** @psalm-check-type-exact $_type = \int */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/IntType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(IntType::type);
/** @psalm-check-type-exact $_type = int */
/** @psalm-check-type-exact $_type = \int */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/InterfaceStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(InterfaceStringType::type);
/** @psalm-check-type-exact $_type = interface-string */
/** @psalm-check-type-exact $_type = \interface-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/IntersectionType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new IntersectionType([StringType::type, IntType::type]));
/** @psalm-check-type-exact $_type = mixed */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/IterableType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new IterableType());
/** @psalm-check-type-exact $_type = iterable */
/** @psalm-check-type-exact $_type = \iterable */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/KeyOfType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new KeyOfType(new ArrayType()));
/** @psalm-check-type-exact $_type = mixed */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ListType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new ListType());
/** @psalm-check-type-exact $_type = list */
/** @psalm-check-type-exact $_type = \list */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/LiteralIntType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(LiteralIntType::type);
/** @psalm-check-type-exact $_type = literal-int */
/** @psalm-check-type-exact $_type = \literal-int */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/LiteralStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(LiteralStringType::type);
/** @psalm-check-type-exact $_type = literal-string */
/** @psalm-check-type-exact $_type = \literal-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/MixedType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(MixedType::type);
/** @psalm-check-type-exact $_type = mixed */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NamedClassStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new NamedClassStringType(new NamedObjectType(\stdClass::class)));
/** @psalm-check-type-exact $_type = class-string<\stdClass> */
/** @psalm-check-type-exact $_type = \class-string<\stdClass> */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NamedObjectType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new NamedObjectType(\stdClass::class));
/** @psalm-check-type-exact $_type = stdClass */
/** @psalm-check-type-exact $_type = \stdClass */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NeverType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ namespace Typhoon\Type;

/** @psalm-suppress NoValue */
$_type = PsalmTest::extractType(NeverType::type);
/** @psalm-check-type-exact $_type = never */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NonEmptyArrayType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new NonEmptyArrayType());
/** @psalm-check-type-exact $_type = non-empty-array */
/** @psalm-check-type-exact $_type = \non-empty-array */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NonEmptyListType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new NonEmptyListType());
/** @psalm-check-type-exact $_type = non-empty-list */
/** @psalm-check-type-exact $_type = \non-empty-list */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NonEmptyStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(NonEmptyStringType::type);
/** @psalm-check-type-exact $_type = non-empty-string */
/** @psalm-check-type-exact $_type = \non-empty-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NullType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(NullType::type);
/** @psalm-check-type-exact $_type = null */
/** @psalm-check-type-exact $_type = \null */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NumericStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(NumericStringType::type);
/** @psalm-check-type-exact $_type = numeric-string */
/** @psalm-check-type-exact $_type = \numeric-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/NumericType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(NumericType::type);
/** @psalm-check-type-exact $_type = numeric */
/** @psalm-check-type-exact $_type = \numeric */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ObjectShapeType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new ObjectShapeType());
/** @psalm-check-type-exact $_type = object */
/** @psalm-check-type-exact $_type = \object */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ObjectType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(ObjectType::type);
/** @psalm-check-type-exact $_type = object */
/** @psalm-check-type-exact $_type = \object */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ResourceType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(ResourceType::type);
/** @psalm-check-type-exact $_type = resource */
/** @psalm-check-type-exact $_type = \resource */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/ScalarType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(ScalarType::type);
/** @psalm-check-type-exact $_type = scalar */
/** @psalm-check-type-exact $_type = \scalar */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/StaticType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new StaticType());
/** @psalm-check-type-exact $_type = object */
/** @psalm-check-type-exact $_type = \object */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/StringLiteralType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new StringLiteralType('a'));
/** @psalm-check-type-exact $_type = 'a' */
/** @psalm-check-type-exact $_type = \'a' */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/StringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(StringType::type);
/** @psalm-check-type-exact $_type = string */
/** @psalm-check-type-exact $_type = \string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/TemplateType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(new TemplateType('T'));
/** @psalm-check-type-exact $_type = mixed */
/** @psalm-check-type-exact $_type = \mixed */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/TraitStringType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(TraitStringType::type);
/** @psalm-check-type-exact $_type = trait-string */
/** @psalm-check-type-exact $_type = \trait-string */

--EXPECT--
2 changes: 1 addition & 1 deletion tests/psalm/TrueType.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Typhoon\Type;

$_type = PsalmTest::extractType(TrueType::type);
/** @psalm-check-type-exact $_type = true */
/** @psalm-check-type-exact $_type = \true */

--EXPECT--
Loading

0 comments on commit f6b2764

Please sign in to comment.