Skip to content

Commit

Permalink
Moved UnusedConstructor suppress to psalm.xml.dist
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Feb 22, 2024
1 parent 8957df5 commit a79d065
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 21 deletions.
1 change: 1 addition & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
</ignoreExceptions>

<issueHandlers>
<UnusedConstructor errorLevel="suppress"/>
<MissingThrowsDocblock>
<errorLevel type="suppress">
<directory name="tests"/>
Expand Down
7 changes: 4 additions & 3 deletions src/PhpParserReflector/ClassReflections.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
use PhpParser\Node\Stmt\Enum_;
use Typhoon\Reflection\ClassReflection;

/**
* @internal
* @psalm-internal Typhoon\Reflection\PhpParserReflector
*/
final class ClassReflections
{
/**
* @psalm-suppress UnusedConstructor
*/
private function __construct() {}

/**
Expand Down
7 changes: 4 additions & 3 deletions src/PhpParserReflector/EnumReflections.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
use Typhoon\Reflection\Metadata\TypeMetadata;
use Typhoon\Type\types;

/**
* @internal
* @psalm-internal Typhoon\Reflection\PhpParserReflector
*/
final class EnumReflections
{
/**
* @psalm-suppress UnusedConstructor
*/
private function __construct() {}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/PhpParserReflector/FixNodeStartLineVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;

/**
* @internal
* @psalm-internal Typhoon\Reflection\PhpParserReflector
*/
final class FixNodeStartLineVisitor extends NodeVisitorAbstract
{
private const START_LINE_ATTRIBUTE = 'startLine';
Expand Down
7 changes: 4 additions & 3 deletions src/PhpParserReflector/MethodReflections.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;

/**
* @internal
* @psalm-internal Typhoon\Reflection\PhpParserReflector
*/
final class MethodReflections
{
/**
* @psalm-suppress UnusedConstructor
*/
private function __construct() {}

public static function isGenerator(ClassMethod $node): bool
Expand Down
7 changes: 4 additions & 3 deletions src/PhpParserReflector/NativeTypeReflections.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
use Typhoon\Type\Type;
use Typhoon\Type\types;

/**
* @internal
* @psalm-internal Typhoon\Reflection\PhpParserReflector
*/
final class NativeTypeReflections
{
/**
* @psalm-suppress UnusedConstructor
*/
private function __construct() {}

public static function reflect(TypeContext $typeContext, Node $node, bool $implicitlyNullable = false): Type
Expand Down
7 changes: 4 additions & 3 deletions src/PhpParserReflector/ParameterReflections.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
use PhpParser\Node\Param;
use PhpParser\Node\Stmt\Class_;

/**
* @internal
* @psalm-internal Typhoon\Reflection\PhpParserReflector
*/
final class ParameterReflections
{
/**
* @psalm-suppress UnusedConstructor
*/
private function __construct() {}

public static function isPromoted(Param $node): bool
Expand Down
7 changes: 4 additions & 3 deletions src/PhpParserReflector/PropertyReflections.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\Property;

/**
* @internal
* @psalm-internal Typhoon\Reflection\PhpParserReflector
*/
final class PropertyReflections
{
/**
* @psalm-suppress UnusedConstructor
*/
private function __construct() {}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/TypeContext/RuntimeExistenceChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

namespace Typhoon\Reflection\TypeContext;

/**
* @internal
* @psalm-internal Typhoon\Reflection\TypeContext
*/
final class RuntimeExistenceChecker implements ConstantExistenceChecker, ClassExistenceChecker
{
public function constantExists(string $name): bool
Expand Down
4 changes: 4 additions & 0 deletions src/TypeContext/TypeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
use Typhoon\Type\Type;
use Typhoon\Type\types;

/**
* @internal
* @psalm-internal Typhoon\Reflection
*/
final class TypeContext implements NameResolver
{
/**
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/FixturesProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ final class FixturesProvider
*/
private static ?array $classes = null;

/**
* @psalm-suppress UnusedConstructor
*/
private function __construct() {}

/**
Expand Down

0 comments on commit a79d065

Please sign in to comment.