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
Feature remove sensitive data #2132
Feature remove sensitive data #2132
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2132 +/- ##
============================================
+ Coverage 93.06% 93.07% +0.01%
- Complexity 3980 4002 +22
============================================
Files 219 220 +1
Lines 10739 10793 +54
============================================
+ Hits 9994 10046 +52
- Misses 745 747 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks good, just a few style comments.
@@ -0,0 +1,7 @@ | |||
[ | |||
{ | |||
"type": "enhancement", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a big enough change to be a feature, and get a minor version bump.
src/TraceMiddleware.php
Outdated
$subIterator = $iterator->getSubIterator($subDepth); | ||
$subIterator->offsetSet( | ||
$subIterator->key(), | ||
($subDepth === $currentDepth ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: the ?
and :
usually appear on the next line in a ternary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, was wondering about that but forgot to go back and check
src/TraceMiddleware.php
Outdated
*/ | ||
private function getRedactedArray(CommandInterface $cmd) | ||
{ | ||
if (!isset($this->service["shapes"])) return $cmd->toArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Even though it uses more lines, the SDK has tended to have if statements do the full bracket 3-line format for readability.
src/TraceMiddleware.php
Outdated
($subDepth === $currentDepth ? | ||
$redactedValue : | ||
$iterator->getSubIterator(($subDepth+1))->getArrayCopy()) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: The closing parentheses and semicolon should be on the same indentation as the start of the expression, same goes for the () parameter within.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.