Skip to content

Commit

Permalink
Fix cs/psalm errors after rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrolGenhald committed Jan 20, 2022
1 parent 8f3300c commit 21edfcc
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/running_psalm/issues.md
Expand Up @@ -61,6 +61,7 @@
- [InvalidCatch](issues/InvalidCatch.md)
- [InvalidClass](issues/InvalidClass.md)
- [InvalidClone](issues/InvalidClone.md)
- [InvalidConstantAssignmentValue](issues/InvalidConstantAssignmentValue.md)
- [InvalidDocblock](issues/InvalidDocblock.md)
- [InvalidDocblockParamName](issues/InvalidDocblockParamName.md)
- [InvalidEnumBackingType](issues/InvalidEnumBackingType.md)
Expand Down Expand Up @@ -265,6 +266,7 @@
- [UnnecessaryVarAnnotation](issues/UnnecessaryVarAnnotation.md)
- [UnrecognizedExpression](issues/UnrecognizedExpression.md)
- [UnrecognizedStatement](issues/UnrecognizedStatement.md)
- [UnresolvableConstant](issues/UnresolvableConstant.md)
- [UnresolvableInclude](issues/UnresolvableInclude.md)
- [UnsafeGenericInstantiation](issues/UnsafeGenericInstantiation.md)
- [UnsafeInstantiation](issues/UnsafeInstantiation.md)
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Exception/UnresolvableConstantException.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm\Exception;

use Exception;
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Issue/ClassConstantIssue.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm\Issue;

use Psalm\CodeLocation;
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Issue/InvalidConstantAssignmentValue.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm\Issue;

class InvalidConstantAssignmentValue extends ClassConstantIssue
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Issue/UnresolvableConstant.php
@@ -1,4 +1,5 @@
<?php

namespace Psalm\Issue;

class UnresolvableConstant extends CodeIssue
Expand Down
1 change: 0 additions & 1 deletion src/Psalm/Storage/ClassConstantStorage.php
Expand Up @@ -60,7 +60,6 @@ class ClassConstantStorage

/**
* @var list<AttributeStorage>
* @psalm-suppress PossiblyUnusedProperty
*/
public $attributes = [];

Expand Down
20 changes: 10 additions & 10 deletions tests/ConstantTest.php
Expand Up @@ -1266,7 +1266,7 @@ public static function boo(
',
],
'selfConstUsesInferredType' => [
'<?php
'code' => '<?php
class Foo
{
/** @var string */
Expand All @@ -1283,7 +1283,7 @@ public function bar(): string
',
],
'typedClassConst' => [
'<?php
'code' => '<?php
class Foo
{
/** @var string */
Expand All @@ -1297,7 +1297,7 @@ public function bar(): string
',
],
'classConstSuppress' => [
'<?php
'code' => '<?php
class Foo
{
/**
Expand All @@ -1310,7 +1310,7 @@ class Foo
',
],
'spreadEmptyArray' => [
'<?php
'code' => '<?php
class A {
public const ARR = [];
}
Expand Down Expand Up @@ -1602,7 +1602,7 @@ enum State {
'php_version' => '8.1',
],
'returnValueofNonExistantConstant' => [
'<?php
'code' => '<?php
class Foo
{
public const BAR = ["bar"];
Expand All @@ -1619,7 +1619,7 @@ public function bar(): string
'error_message' => 'UnresolvableConstant',
],
'returnValueofStaticConstant' => [
'<?php
'code' => '<?php
class Foo
{
public const BAR = ["bar"];
Expand All @@ -1636,7 +1636,7 @@ public function bar(): string
'error_message' => 'UnresolvableConstant',
],
'takeKeyofNonExistantConstant' => [
'<?php
'code' => '<?php
class Foo
{
public const BAR = ["bar"];
Expand All @@ -1653,7 +1653,7 @@ public function bar(int $key): string
'error_message' => 'UnresolvableConstant',
],
'takeKeyofStaticConstant' => [
'<?php
'code' => '<?php
class Foo
{
public const BAR = ["bar"];
Expand All @@ -1670,7 +1670,7 @@ public function bar(int $key): string
'error_message' => 'UnresolvableConstant',
],
'invalidConstantAssignmentType' => [
'<?php
'code' => '<?php
class Foo
{
/** @var int */
Expand All @@ -1680,7 +1680,7 @@ class Foo
'error_message' => "InvalidConstantAssignmentValue",
],
'invalidConstantAssignmentTypeResolvedLate' => [
'<?php
'code' => '<?php
class Foo
{
/** @var int */
Expand Down

0 comments on commit 21edfcc

Please sign in to comment.