Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHPStan Baseline] Fix a few errors #216

Merged
merged 3 commits into from
Nov 9, 2021

Conversation

AlexandruGG
Copy link
Collaborator

@AlexandruGG AlexandruGG commented Nov 9, 2021

This PR:

  • Fixes a few of the PHPStan baseline errors.

Follows #212

Comment on lines -362 to +359
* @return self<NewTKey, NewT>
* @return self<mixed, mixed>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these template types cannot be inferred from anywhere, so the better option here is to just use mixed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough!

@@ -212,6 +212,7 @@
* @template-extends Prependable<TKey, T>
* @template-extends Productable<TKey, T>
* @template-extends Randomable<TKey, T>
* @template-extends Rangeable<TKey, T>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somehow this was missing 😄

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch :-)

@@ -9,6 +9,7 @@

namespace loophp\collection\Contract\Operation;

use Closure;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found a couple of these where the import was missing but the Closure was mentioned in the doc blocks. Because of the missing import PHPStan couldn't resolve the type

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! Nice ones!

@AlexandruGG AlexandruGG changed the title Feature/fix phpstan baseline [PHPStan Baseline] Fix a few errors Nov 9, 2021
Copy link
Collaborator

@drupol drupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -9,6 +9,7 @@

namespace loophp\collection\Contract\Operation;

use Closure;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! Nice ones!

@AlexandruGG AlexandruGG marked this pull request as ready for review November 9, 2021 09:01
Copy link
Collaborator

@drupol drupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@AlexandruGG
Copy link
Collaborator Author

Approved!

Thanks 😁 . I'll merge this once the checks have finished

@AlexandruGG AlexandruGG merged commit 5b09aa5 into master Nov 9, 2021
@AlexandruGG AlexandruGG deleted the feature/fix-phpstan-baseline branch November 9, 2021 10:33
@drupol
Copy link
Collaborator

drupol commented Nov 9, 2021

Thanks !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants