Skip to content

Commit

Permalink
I'm tired of wrestling with this.
Browse files Browse the repository at this point in the history
We conditionally define random_bytes() and fallback to an
implementation that ALWAYS throws an Exception. However, in
libraries that consume random_compat, we want the type hint to
always be a string.

So, I'm done. Suppress the damn error (but still print it) and
let's move on with our lives.
  • Loading branch information
paragonie-security committed Jun 6, 2018
1 parent 71883fb commit cbe0b11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/random.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class_exists('COM')
*
* @param mixed $length
* @psalm-suppress MissingReturnType
* @psalm-suppress InvalidReturnType
* @throws Exception
* @return string
*/
Expand Down
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
<InvalidOperand errorLevel="info" />
<UndefinedConstant errorLevel="info" />
<MissingReturnType errorLevel="info" />
<InvalidReturnType errorLevel="info" />
</issueHandlers>
</psalm>

0 comments on commit cbe0b11

Please sign in to comment.