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

Implement OpenSslEncryptParameterOutTypeExtension #3753

Open
wants to merge 1 commit into
base: 1.12.x
Choose a base branch
from

Conversation

paulbalandan
Copy link
Contributor

@paulbalandan paulbalandan force-pushed the openssl-encrypt branch 2 times, most recently from 7394404 to 1663a9f Compare December 22, 2024 15:54
@paulbalandan paulbalandan changed the title Add stub for $tag of openssl_encrypt() Implement OpenSslEncryptParameterOutTypeExtension Dec 22, 2024
@paulbalandan paulbalandan force-pushed the openssl-encrypt branch 2 times, most recently from 4a82c99 to e22aae5 Compare December 22, 2024 18:50
@paulbalandan paulbalandan marked this pull request as draft December 22, 2024 18:56
@paulbalandan paulbalandan marked this pull request as ready for review December 22, 2024 19:05
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

return null;
}

$cipherType = current($scope->getType($cipherArg->value)->getConstantStrings());
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you only work on the first cipher type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I just realised you can do unions of literal strings. Updated the code to check all cases.


$cipherType = $scope->getType($cipherArg->value);

return TypeTraverser::map($cipherType, static function (Type $type, callable $traverse): Type {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need the TypeTraverser here. Couldn't you just iterate over getConstantStrings()?

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.

4 participants