Skip to content

Commit

Permalink
Updated packages
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Sep 13, 2023
1 parent 77dc8fc commit 74ade7c
Show file tree
Hide file tree
Showing 11 changed files with 195 additions and 390 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"php": "^8.1"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.31.0",
"friendsofphp/php-cs-fixer": "^3.17.0",
"phpyh/coding-standard": "^2.4.0",
"vimeo/psalm": "^5.12.0"
"ergebnis/composer-normalize": "^2.36.0",
"friendsofphp/php-cs-fixer": "^3.26.1",
"phpyh/coding-standard": "^2.5.0",
"vimeo/psalm": "^5.15.0"
},
"autoload": {
"psr-4": {
Expand Down
532 changes: 170 additions & 362 deletions composer.lock

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,17 @@
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>

<forbiddenFunctions>
<function name="dd"/>
<function name="die"/>
<function name="dump"/>
<function name="echo"/>
<function name="empty"/>
<function name="eval"/>
<function name="exit"/>
<function name="print"/>
<function name="sleep"/>
<function name="usleep"/>
</forbiddenFunctions>
</psalm>
4 changes: 1 addition & 3 deletions src/types.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ final class types
/**
* @psalm-suppress UnusedConstructor
*/
private function __construct()
{
}
private function __construct() {}

/**
* @psalm-pure
Expand Down
4 changes: 1 addition & 3 deletions tests/Type/ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
/** @psalm-check-type-exact $_intStringArray = array<int, string> */
$_intStringArray = extractType(new ArrayType(IntType::type, StringType::type));

function testArrayIsCovariant(ArrayType $_type): void
{
}
function testArrayIsCovariant(ArrayType $_type): void {}

testArrayIsCovariant(new ArrayType(IntType::type, StringType::type));
4 changes: 1 addition & 3 deletions tests/Type/FloatLiteralTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
/**
* @param FloatLiteralType<0.5|-1.7> $_type
*/
function testFloatLiteralIsCovariant(FloatLiteralType $_type): void
{
}
function testFloatLiteralIsCovariant(FloatLiteralType $_type): void {}

testFloatLiteralIsCovariant(new FloatLiteralType(-1.7));
4 changes: 1 addition & 3 deletions tests/Type/IntLiteralTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ function generateLiteralInt(): int
/**
* @param IntLiteralType<1|2> $_type
*/
function testIntLiteralIsCovariant(IntLiteralType $_type): void
{
}
function testIntLiteralIsCovariant(IntLiteralType $_type): void {}

testIntLiteralIsCovariant(new IntLiteralType(1));
4 changes: 1 addition & 3 deletions tests/Type/NamedObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
/** @psalm-check-type-exact $_arrayObject = \ArrayObject<int, string> */
$_arrayObject = extractType($arrayObjectType);

function testObjectIsCovariant(NamedObjectType $_type): void
{
}
function testObjectIsCovariant(NamedObjectType $_type): void {}

testObjectIsCovariant(new NamedObjectType(\stdClass::class));
4 changes: 1 addition & 3 deletions tests/Type/ShapeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
/** @psalm-check-type-exact $_shape = array{a?: string, 10: int} */
$_shape = extractType($_shapeType);

function testShapeIsCovariant(ShapeType $_type): void
{
}
function testShapeIsCovariant(ShapeType $_type): void {}

testShapeIsCovariant($_shapeType);
4 changes: 1 addition & 3 deletions tests/Type/StringLiteralTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ function generateLiteralString(): string
/**
* @param StringLiteralType<'abc'|'xyz'> $_type
*/
function testStringLiteralIsCovariant(StringLiteralType $_type): void
{
}
function testStringLiteralIsCovariant(StringLiteralType $_type): void {}

testStringLiteralIsCovariant(new StringLiteralType('abc'));
4 changes: 1 addition & 3 deletions tests/Type/UnionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
/**
* @param UnionType<int|string|float> $_type
*/
function testUnionIsCovariant(UnionType $_type): void
{
}
function testUnionIsCovariant(UnionType $_type): void {}

testUnionIsCovariant(new UnionType([IntType::type, StringType::type]));

0 comments on commit 74ade7c

Please sign in to comment.