Update psalm, infection, mago, ... (#506) #2749
Annotations
10 warnings and 10 notices
strictness/require-return-type:
tests/unit/Type/Exception/TypeAssertExceptionTest.php#L30
Method `testIncorrectNestedType` is missing a return type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a return type hint to method `testIncorrectNestedType`.
|
strictness/require-parameter-type:
src/Psl/sequence.php#L18
Parameter `$args` is missing a type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a type hint to parameter `$args`.
|
strictness/require-return-type:
src/Psl/sequence.php#L18
Function `sequence` is missing a return type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a return type hint to function `sequence`.
|
strictness/no-assignment-in-condition:
examples/io/benchmark.php#L47
Avoid assignments in conditions.
Assigning a value within a condition can lead to unexpected behavior and make the code harder to read and understand.
It's easy to confuse assignment (`=`) with comparison (`==`) in this context. ensure you're using the correct operator.
|
strictness/require-return-type:
examples/io/benchmark.php#L42
Arrow function is missing a return type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a return type hint to the arrow function.
|
strictness/require-return-type:
tests/unit/Dict/DropWhileTest.php#L25
Arrow function is missing a return type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a return type hint to the arrow function.
|
strictness/require-return-type:
tests/unit/Dict/DropWhileTest.php#L26
Arrow function is missing a return type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a return type hint to the arrow function.
|
strictness/require-return-type:
tests/unit/Dict/DropWhileTest.php#L27
Arrow function is missing a return type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a return type hint to the arrow function.
|
best-practices/no-multi-assignments:
src/Psl/Type/Internal/VecType.php#L69
Avoid using multiple assignments in a single statement.
Multiple assignments in a single statement can be confusing and lead to unexpected behavior.
Help: Did you mean `$i = ($v == null)` instead? Ensure the intended logic is clear.
|
best-practices/no-multi-assignments:
src/Psl/Type/Internal/VecType.php#L112
Avoid using multiple assignments in a single statement.
Multiple assignments in a single statement can be confusing and lead to unexpected behavior.
Help: Did you mean `$i = ($v == null)` instead? Ensure the intended logic is clear.
|
naming/interface:
src/Psl/Comparison/Equable.php#L10
interface name `Equable` should be suffixed with `Interface`.
The interface name `Equable` does not follow PSR naming convention.
Help: Consider renaming it to `EquableInterface` to adhere to the naming convention.
|
naming/class:
src/Psl/Type/Type.php#L14
Abstract class name `Type` should be prefixed with `Abstract`.
The abstract class name `Type` does not follow PSR naming convention.
Help: Consider renaming it to `AbstractType` to adhere to the naming convention.
|
naming/function:
tests/static-analysis/Type/converted.php#L14
Function name `testsPurity` should be in snake case.
The function name `testsPurity` does not follow snake naming convention.
Help: Consider renaming it to `tests_purity` to adhere to the naming convention.
|
best-practices/no-empty-loop:
tests/unit/Range/FromRangeTest.php#L99
Loop body is empty
Help: Consider removing this loop or adding meaningful logic to its body.
|
naming/class:
src/Psl/Encoding/Base64/Internal/Base64.php#L25
Abstract class name `Base64` should be prefixed with `Abstract`.
The abstract class name `Base64` does not follow PSR naming convention.
Help: Consider renaming it to `AbstractBase64` to adhere to the naming convention.
|
naming/class:
tests/benchmark/Type/GenericTypeBench.php#L13
Abstract class name `GenericTypeBench` should be prefixed with `Abstract`.
The abstract class name `GenericTypeBench` does not follow PSR naming convention.
Help: Consider renaming it to `AbstractGenericTypeBench` to adhere to the naming convention.
|
naming/class:
src/Psl/Type/Exception/Exception.php#L10
Abstract class name `Exception` should be prefixed with `Abstract`.
The abstract class name `Exception` does not follow PSR naming convention.
Help: Consider renaming it to `AbstractException` to adhere to the naming convention.
|
naming/interface:
src/Psl/Comparison/Comparable.php#L12
interface name `Comparable` should be suffixed with `Interface`.
The interface name `Comparable` does not follow PSR naming convention.
Help: Consider renaming it to `ComparableInterface` to adhere to the naming convention.
|
naming/class:
tests/static-analysis/Comparison/comparable.php#L21
Abstract class name `Size` should be prefixed with `Abstract`.
The abstract class name `Size` does not follow PSR naming convention.
Help: Consider renaming it to `AbstractSize` to adhere to the naming convention.
|
naming/class:
tests/unit/Type/TypeTest.php#L18
Abstract class name `TypeTest` should be prefixed with `Abstract`.
The abstract class name `TypeTest` does not follow PSR naming convention.
Help: Consider renaming it to `AbstractTypeTest` to adhere to the naming convention.
|