feat(testing): add testing framework #2890
coding-conventions.yml
on: pull_request
Run style check
35s
Run static analysis: PHPStan
47s
Annotations
4 errors and 5 warnings
|
Run style check
Process completed with exit code 1.
|
|
no-empty:
packages/testing/src/Testers/Tester.php#L306
Use of the `empty` construct.
`empty()` exhibits unexpected behavior on specific value.
It is unclear what condition is being treated with `empty()`.
Help: Use strict comparison or specific predicate function to clearly convey your intent.
|
|
no-empty:
packages/testing/src/Testers/Tester.php#L297
Use of the `empty` construct.
`empty()` exhibits unexpected behavior on specific value.
It is unclear what condition is being treated with `empty()`.
Help: Use strict comparison or specific predicate function to clearly convey your intent.
|
|
semantics:
packages/testing/tests/ProviderTest.php#L66
Attribute `Provide` argument contains a non-constant expression.
Attribute arguments must be constant expressions.
|
|
return-type:
packages/testing/tests/PsrInjectionTest.php#L58
Method `get` 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 `get`.
|
|
strict-behavior:
packages/testing/src/Testers/Tester.php#L182
Call to `in_array` must enforce strict comparison.
The `allow_loose_behavior` option is enabled; you may set the `$strict` parameter to `false`.
Help: Call the function `in_array` with the `$strict` parameter set to `true`.
|
|
strict-behavior:
packages/testing/src/Testers/Tester.php#L165
Call to `in_array` must enforce strict comparison.
The `allow_loose_behavior` option is enabled; you may set the `$strict` parameter to `false`.
Help: Call the function `in_array` with the `$strict` parameter set to `true`.
|
|
identity-comparison:
packages/testing/src/Testers/Tester.php#L90
Use identity comparison `===` instead of equality comparison `==`.
Identity comparison `===` checks for both value and type equality, while equality comparison `==` performs type coercion, which can lead to unexpected results.
Help: Use `===` to ensure both value and type are equal.
|
|
identity-comparison:
packages/testing/src/Testers/Tester.php#L81
Use identity inequality `!==` instead of inequality comparison `!=`.
Identity inequality `!==` checks for both value and type inequality, while inequality comparison `!=` performs type coercion, which can lead to unexpected results.
Help: Use `!==` to ensure both value and type are different.
|