NelmioSecurityBundle
NelmioSecurityBundle copied to clipboard
Make data array variable type within `Report` more precise
Just a minor issue that PHP stan found in our project:
Error: Parameter #1 $data of class Nelmio\SecurityBundle\ContentSecurityPolicy\Violation\Report constructor expects array<string, string>, array<string, int|string> given.
------ ----------------------------------------------------------------------
Line core-bundle/tests/EventListener/CspReportListenerTest.php
------ ----------------------------------------------------------------------
47 Parameter #1 $data of class
Nelmio\SecurityBundle\ContentSecurityPolicy\Violation\Report
constructor expects array<string, string>, array<string, int|string>
given.
------ ----------------------------------------------------------------------
The JSON data sent by the browser can in fact also have integers for the following keys:
column-numberline-numberstatus-code
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
da7cc88) 96.93% compared to head (f7a2bde) 96.93%.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #332 +/- ##
=========================================
Coverage 96.93% 96.93%
Complexity 429 429
=========================================
Files 52 52
Lines 1923 1923
=========================================
Hits 1864 1864
Misses 59 59
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Not sure how to fix the other issues reported by PHP stan. These methods do in fact only ever return a string or null.