Skip to content

Make the type signatures of some hash functions more specific#1224

Merged
ondrejmirtes merged 1 commit into
phpstan:1.6.xfrom
oliverklee:bugfix/hash-signature
Apr 18, 2022
Merged

Make the type signatures of some hash functions more specific#1224
ondrejmirtes merged 1 commit into
phpstan:1.6.xfrom
oliverklee:bugfix/hash-signature

Conversation

@oliverklee

Copy link
Copy Markdown
Contributor

The following hash functions cannot return an empty string, but
had string return type signature before:

  • crypt
  • password_hash
  • sha1
  • sha1_file

Those function now are marked as returning non-empty-strings.

Fixes phpstan/phpstan#7051

The following hash functions cannot return an empty string, but
had `string` return type signature before:

- `crypt`
- `password_hash`
- `sha1`
- `sha1_file`

Those function now are marked as returning `non-empty-string`s.

Fixes phpstan/phpstan#7051
@ondrejmirtes ondrejmirtes merged commit 0d30349 into phpstan:1.6.x Apr 18, 2022
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you!

@oliverklee

Copy link
Copy Markdown
Contributor Author

You're welcome! (And Happy Easter!) 🥚

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.

sha1 should return non-empty string

2 participants