Repository navigation
refactor: Resolve all phpstan errors (lvl 5) - #1404
Merged
paulbalandan merged 4 commits intoNov 13, 2026
Merged
Conversation
neznaika0
force-pushed
the
refactor/fix-phpstan-errors
branch
from
November 11, 2026 10:38
1a1ac36 to
2db9061
Compare
neznaika0
commented
Nov 11, 2026
neznaika0
left a comment
Contributor
Author
There was a problem hiding this comment.
Rebased.
But I left the properties without null; they should be present in all cases.
And console output:
[WARNING] These rules are registered in both sets and "withRules()". Remove them from "withRules()" to avoid
duplications:
* Rector\PHPUnit\PHPUnit120\Rector\CallLike\CreateStubOverCreateMockArgRector *
Rector\PHPUnit\PHPUnit120\Rector\ClassMethod\ExpressionCreateMockToCreateStubRector *
Rector\PHPUnit\PHPUnit120\Rector\Class_\PropertyCreateMockToCreateStubRector *
Rector\PHPUnit\PHPUnit120\Rector\Property\MockObjectVarToStubRector *
Rector\PHPUnit\CodeQuality\Rector\Class_\AddStubIntersectionVarToStubPropertyRector *
Rector\PHPUnit\CodeQuality\Rector\ClassMethod\BareCreateMockAssignToDirectUseRector *
Rector\PHPUnit\CodeQuality\Rector\MethodCall\RemoveExpectAnyFromMockRector *
Rector\PHPUnit\PHPUnit60\Rector\MethodCall\GetMockBuilderGetMockToCreateMockRector
michalsn
reviewed
Nov 12, 2026
michalsn
approved these changes
Nov 12, 2026
Contributor
Author
|
The analyzer didn’t complain about - private JWSAdapterInterface $jwsAdapter;
/**
* @var string The key group. The array key of Config\AuthJWT::$keys.
*/
protected $keyset = 'default';
- public function __construct(?JWSAdapterInterface $jwsAdapter = null)
+ public function __construct(private ?JWSAdapterInterface $jwsAdapter = null)
{ |
Member
|
I guess we should. |
neznaika0
force-pushed
the
refactor/fix-phpstan-errors
branch
from
November 12, 2026 18:07
2db9061 to
e94a95e
Compare
paulbalandan
approved these changes
Nov 13, 2026
Contributor
Author
|
Coveralls fixed in next PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
$thisfor PHPUnit static methods; PHPStan now ignores them@phpstan-*prefixes are irrelevant since the project relies entirely on PHPStannullhas no meaning and properties should always have a value. Previouslynullwas used for convenience of object initializationNothingPersonalValidator::isNotPersonal()is now more preciseEmailConfigvalues have long been strings;(string)cast is no longer relevant$credentialsfiltering: let us know if all empty values (0, '0', 0.0...) need to be checkedIf you approve these changes, I have more fixes for
NothingPersonalValidatorcoming up.Going forward, I can update the errors from the PHPStan baseline.
Checklist: