-
Notifications
You must be signed in to change notification settings - Fork 1
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
Enhance input validation in ShieldsIo class #215
Conversation
PR Review 🔍
|
Here's the code health analysis summary for commits Analysis Summary
Code Coverage Report
|
PR Code Suggestions ✨
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #215 +/- ##
==========================================
- Coverage 95.65% 95.59% -0.06%
==========================================
Files 8 8
Lines 230 227 -3
==========================================
- Hits 220 217 -3
Misses 10 10 ☔ View full report in Codecov by Sentry. |
@@ -15,36 +15,32 @@ | |||
return $input; | |||
} | |||
|
|||
public function generateBadgeUrl($label, $content, $color, $style, $labelColor, $logo) | |||
private function addComponent($component, &$badge) |
Check warning
Code scanning / Phpcs (reported by Codacy)
Missing doc comment for function addComponent() Warning
} | ||
} |
Check warning
Code scanning / Phpcs (reported by Codacy)
Expected //end addComponent() Warning
} | ||
} |
Check warning
Code scanning / Phpcs (reported by Codacy)
Expected 1 blank line before closing function brace; 0 found Warning
} | ||
} |
Check warning
Code scanning / Phpcs (reported by Codacy)
Expected 1 blank line before closing function brace; 0 found Warning
} | ||
} |
Check warning
Code scanning / Phpcs (reported by Codacy)
Expected 2 blank lines after function; 1 found Warning
} | ||
} |
Check warning
Code scanning / Phpcs (reported by Codacy)
Expected //end addQueryString() Warning
if (isset($color) && !empty($color)) { | ||
$badge[] = $color; | ||
} | ||
public function generateBadgeUrl($label, $content, $color, $style, $labelColor, $logo) |
Check warning
Code scanning / Phpcs (reported by Codacy)
Missing doc comment for function generateBadgeUrl() Warning
Infisical secrets check: ✅ No secrets leaked! Scan results:
|
Quality Gate passedIssues Measures |
$queryString = array(); | ||
if (isset($style) && !empty($style)) { | ||
$queryString["style"] = $style; | ||
if (isset($component) && (empty($component) === false || $component === 0)) { |
Check warning
Code scanning / Phpcs (reported by Codacy)
Implicit true comparisons prohibited; use === TRUE instead Warning
$queryString["labelColor"] = $labelColor; | ||
private function addQueryString($component, $key, &$queryString) | ||
{ | ||
if (isset($component) && empty($component) === false) { |
Check warning
Code scanning / Phpcs (reported by Codacy)
Implicit true comparisons prohibited; use === TRUE instead Warning
Description
ShieldsIo
class to handle null values.encodeShieldsIoParameters
method.Changes walkthrough 📝
ShieldsIo.php
Enhance input validation in ShieldsIo class
src/ShieldsIo.php
encodeShieldsIoParameters
.null
instead of usingempty
.