Update psalm, infection, mago, ... #2743
coding-standards.yml
on: pull_request
coding standards
15s
Annotations
11 warnings and 10 notices
coding standards
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
strictness/require-return-type:
src/Psl/Fun/lazy.php#L22
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-constant-type:
src/Psl/Network/Address.php#L12
Class constant `DEFAULT_HOST` is missing a type hint.
Adding a type hint to constants improves code readability and helps prevent type errors.
Help: Consider specifying a type hint for `DEFAULT_HOST`.
|
strictness/require-constant-type:
src/Psl/Network/Address.php#L13
Class constant `DEFAULT_PORT` is missing a type hint.
Adding a type hint to constants improves code readability and helps prevent type errors.
Help: Consider specifying a type hint for `DEFAULT_PORT`.
|
strictness/require-return-type:
examples/tcp/basic-http-server.php#L44
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:
src/Psl/Internal/box.php#L28
Closure 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 closure.
|
strictness/no-assignment-in-condition:
src/Psl/Str/pad_right.php#L40
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:
src/Psl/Result/Failure.php#L120
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:
src/Psl/Result/Failure.php#L148
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-parameter-type:
src/Psl/Dict/unique.php#L28
Parameter `$v` is missing a type hint.
Type hints improve code readability and help prevent type-related errors.
Help: Consider adding a type hint to parameter `$v`.
|
strictness/require-return-type:
src/Psl/Dict/unique.php#L28
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.
|
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/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.
|
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/trait:
tests/unit/Math/FloatAsserts.php#L10
Trait name `FloatAsserts` should be suffixed with `Trait`.
The trait name `FloatAsserts` does not follow PSR naming convention.
Help: Consider renaming it to `FloatAssertsTrait` 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/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/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/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/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.
|