Skip to content

Commit

Permalink
Adding "use" statements for src/Redact.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kktsvetkov committed May 29, 2021
1 parent 15b706d commit 614595e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},

"require-dev": {
"phpunit/phpunit": "^7.5 || ^8.5"
"phpunit/phpunit": "^7.5.20 || ^8.5.13 || ^9.3.8"
},

"autoload-dev": {
Expand Down
16 changes: 15 additions & 1 deletion src/Redact.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@

namespace Fuko\Masked;

use InvalidArgumentException;

use const FILTER_SANITIZE_STRING;

use function abs;
use function array_unshift;
use function call_user_func_array;
use function filter_var;
use function is_callable;
use function round;
use function strlen;
use function str_repeat;
use function substr;

/**
* Masks sensitive data: replaces blacklisted elements with redacted values
*
Expand Down Expand Up @@ -60,7 +74,7 @@ public static function setRedactCallback($callback, array $arguments = null)
{
if (!is_callable($callback))
{
throw new \InvalidArgumentException(
throw new InvalidArgumentException(
'First argument to '
. __METHOD__
. '() must be a valid callback'
Expand Down

0 comments on commit 614595e

Please sign in to comment.