Skip to content

Commit 4f8aa80

Browse files
authored
Phpstan Baseline < 4000 Lines Part 2 Html (#3037)
Continue to reduce the size of Phpstan Baseline by fixing problems reported for Writer/Html.
1 parent 9eb5e7e commit 4f8aa80

File tree

3 files changed

+54
-360
lines changed

3 files changed

+54
-360
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 310 deletions
Original file line numberDiff line numberDiff line change
@@ -3155,316 +3155,6 @@ parameters:
31553155
count: 2
31563156
path: src/PhpSpreadsheet/Worksheet/Worksheet.php
31573157

3158-
-
3159-
message: "#^Call to function array_key_exists\\(\\) with int and array\\{none\\: 'none', dashDot\\: '1px dashed', dashDotDot\\: '1px dotted', dashed\\: '1px dashed', dotted\\: '1px dotted', double\\: '3px double', hair\\: '1px solid', medium\\: '2px solid', \\.\\.\\.\\} will always evaluate to false\\.$#"
3160-
count: 1
3161-
path: src/PhpSpreadsheet/Writer/Html.php
3162-
3163-
-
3164-
message: "#^Cannot access offset 'mime' on array\\|false\\.$#"
3165-
count: 2
3166-
path: src/PhpSpreadsheet/Writer/Html.php
3167-
3168-
-
3169-
message: "#^Cannot access offset 0 on array\\|false\\.$#"
3170-
count: 1
3171-
path: src/PhpSpreadsheet/Writer/Html.php
3172-
3173-
-
3174-
message: "#^Cannot access offset 1 on array\\|false\\.$#"
3175-
count: 1
3176-
path: src/PhpSpreadsheet/Writer/Html.php
3177-
3178-
-
3179-
message: "#^Cannot call method getSubscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
3180-
count: 1
3181-
path: src/PhpSpreadsheet/Writer/Html.php
3182-
3183-
-
3184-
message: "#^Cannot call method getSuperscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
3185-
count: 1
3186-
path: src/PhpSpreadsheet/Writer/Html.php
3187-
3188-
-
3189-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:calculateSpansOmitRows\\(\\) has parameter \\$candidateSpannedRow with no type specified\\.$#"
3190-
count: 1
3191-
path: src/PhpSpreadsheet/Writer/Html.php
3192-
3193-
-
3194-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:calculateSpansOmitRows\\(\\) has parameter \\$sheet with no type specified\\.$#"
3195-
count: 1
3196-
path: src/PhpSpreadsheet/Writer/Html.php
3197-
3198-
-
3199-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:calculateSpansOmitRows\\(\\) has parameter \\$sheetIndex with no type specified\\.$#"
3200-
count: 1
3201-
path: src/PhpSpreadsheet/Writer/Html.php
3202-
3203-
-
3204-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateHTMLFooter\\(\\) has no return type specified\\.$#"
3205-
count: 1
3206-
path: src/PhpSpreadsheet/Writer/Html.php
3207-
3208-
-
3209-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateMeta\\(\\) has no return type specified\\.$#"
3210-
count: 1
3211-
path: src/PhpSpreadsheet/Writer/Html.php
3212-
3213-
-
3214-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateMeta\\(\\) has parameter \\$desc with no type specified\\.$#"
3215-
count: 1
3216-
path: src/PhpSpreadsheet/Writer/Html.php
3217-
3218-
-
3219-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateMeta\\(\\) has parameter \\$val with no type specified\\.$#"
3220-
count: 1
3221-
path: src/PhpSpreadsheet/Writer/Html.php
3222-
3223-
-
3224-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has no return type specified\\.$#"
3225-
count: 1
3226-
path: src/PhpSpreadsheet/Writer/Html.php
3227-
3228-
-
3229-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has parameter \\$cellAddress with no type specified\\.$#"
3230-
count: 1
3231-
path: src/PhpSpreadsheet/Writer/Html.php
3232-
3233-
-
3234-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has parameter \\$columnNumber with no type specified\\.$#"
3235-
count: 1
3236-
path: src/PhpSpreadsheet/Writer/Html.php
3237-
3238-
-
3239-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has parameter \\$row with no type specified\\.$#"
3240-
count: 1
3241-
path: src/PhpSpreadsheet/Writer/Html.php
3242-
3243-
-
3244-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has no return type specified\\.$#"
3245-
count: 1
3246-
path: src/PhpSpreadsheet/Writer/Html.php
3247-
3248-
-
3249-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has parameter \\$cell with no type specified\\.$#"
3250-
count: 1
3251-
path: src/PhpSpreadsheet/Writer/Html.php
3252-
3253-
-
3254-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has parameter \\$cellType with no type specified\\.$#"
3255-
count: 1
3256-
path: src/PhpSpreadsheet/Writer/Html.php
3257-
3258-
-
3259-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has parameter \\$cssClass with no type specified\\.$#"
3260-
count: 1
3261-
path: src/PhpSpreadsheet/Writer/Html.php
3262-
3263-
-
3264-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValue\\(\\) has parameter \\$cell with no type specified\\.$#"
3265-
count: 1
3266-
path: src/PhpSpreadsheet/Writer/Html.php
3267-
3268-
-
3269-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValue\\(\\) has parameter \\$cellData with no type specified\\.$#"
3270-
count: 1
3271-
path: src/PhpSpreadsheet/Writer/Html.php
3272-
3273-
-
3274-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValueRich\\(\\) has parameter \\$cell with no type specified\\.$#"
3275-
count: 1
3276-
path: src/PhpSpreadsheet/Writer/Html.php
3277-
3278-
-
3279-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValueRich\\(\\) has parameter \\$cellData with no type specified\\.$#"
3280-
count: 1
3281-
path: src/PhpSpreadsheet/Writer/Html.php
3282-
3283-
-
3284-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowIncludeCharts\\(\\) has no return type specified\\.$#"
3285-
count: 1
3286-
path: src/PhpSpreadsheet/Writer/Html.php
3287-
3288-
-
3289-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowIncludeCharts\\(\\) has parameter \\$coordinate with no type specified\\.$#"
3290-
count: 1
3291-
path: src/PhpSpreadsheet/Writer/Html.php
3292-
3293-
-
3294-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has no return type specified\\.$#"
3295-
count: 1
3296-
path: src/PhpSpreadsheet/Writer/Html.php
3297-
3298-
-
3299-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has parameter \\$colSpan with no type specified\\.$#"
3300-
count: 1
3301-
path: src/PhpSpreadsheet/Writer/Html.php
3302-
3303-
-
3304-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has parameter \\$html with no type specified\\.$#"
3305-
count: 1
3306-
path: src/PhpSpreadsheet/Writer/Html.php
3307-
3308-
-
3309-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has parameter \\$rowSpan with no type specified\\.$#"
3310-
count: 1
3311-
path: src/PhpSpreadsheet/Writer/Html.php
3312-
3313-
-
3314-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$cellData with no type specified\\.$#"
3315-
count: 1
3316-
path: src/PhpSpreadsheet/Writer/Html.php
3317-
3318-
-
3319-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$cellType with no type specified\\.$#"
3320-
count: 1
3321-
path: src/PhpSpreadsheet/Writer/Html.php
3322-
3323-
-
3324-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$colNum with no type specified\\.$#"
3325-
count: 1
3326-
path: src/PhpSpreadsheet/Writer/Html.php
3327-
3328-
-
3329-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$colSpan with no type specified\\.$#"
3330-
count: 1
3331-
path: src/PhpSpreadsheet/Writer/Html.php
3332-
3333-
-
3334-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$coordinate with no type specified\\.$#"
3335-
count: 1
3336-
path: src/PhpSpreadsheet/Writer/Html.php
3337-
3338-
-
3339-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$cssClass with no type specified\\.$#"
3340-
count: 1
3341-
path: src/PhpSpreadsheet/Writer/Html.php
3342-
3343-
-
3344-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$html with no type specified\\.$#"
3345-
count: 1
3346-
path: src/PhpSpreadsheet/Writer/Html.php
3347-
3348-
-
3349-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$row with no type specified\\.$#"
3350-
count: 1
3351-
path: src/PhpSpreadsheet/Writer/Html.php
3352-
3353-
-
3354-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$rowSpan with no type specified\\.$#"
3355-
count: 1
3356-
path: src/PhpSpreadsheet/Writer/Html.php
3357-
3358-
-
3359-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$sheetIndex with no type specified\\.$#"
3360-
count: 1
3361-
path: src/PhpSpreadsheet/Writer/Html.php
3362-
3363-
-
3364-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetPrep\\(\\) has no return type specified\\.$#"
3365-
count: 1
3366-
path: src/PhpSpreadsheet/Writer/Html.php
3367-
3368-
-
3369-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetStarts\\(\\) has no return type specified\\.$#"
3370-
count: 1
3371-
path: src/PhpSpreadsheet/Writer/Html.php
3372-
3373-
-
3374-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetStarts\\(\\) has parameter \\$rowMin with no type specified\\.$#"
3375-
count: 1
3376-
path: src/PhpSpreadsheet/Writer/Html.php
3377-
3378-
-
3379-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetStarts\\(\\) has parameter \\$sheet with no type specified\\.$#"
3380-
count: 1
3381-
path: src/PhpSpreadsheet/Writer/Html.php
3382-
3383-
-
3384-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has no return type specified\\.$#"
3385-
count: 1
3386-
path: src/PhpSpreadsheet/Writer/Html.php
3387-
3388-
-
3389-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$row with no type specified\\.$#"
3390-
count: 1
3391-
path: src/PhpSpreadsheet/Writer/Html.php
3392-
3393-
-
3394-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$tbodyStart with no type specified\\.$#"
3395-
count: 1
3396-
path: src/PhpSpreadsheet/Writer/Html.php
3397-
3398-
-
3399-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$theadEnd with no type specified\\.$#"
3400-
count: 1
3401-
path: src/PhpSpreadsheet/Writer/Html.php
3402-
3403-
-
3404-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$theadStart with no type specified\\.$#"
3405-
count: 1
3406-
path: src/PhpSpreadsheet/Writer/Html.php
3407-
3408-
-
3409-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableFooter\\(\\) has no return type specified\\.$#"
3410-
count: 1
3411-
path: src/PhpSpreadsheet/Writer/Html.php
3412-
3413-
-
3414-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTag\\(\\) has parameter \\$html with no type specified\\.$#"
3415-
count: 1
3416-
path: src/PhpSpreadsheet/Writer/Html.php
3417-
3418-
-
3419-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTag\\(\\) has parameter \\$id with no type specified\\.$#"
3420-
count: 1
3421-
path: src/PhpSpreadsheet/Writer/Html.php
3422-
3423-
-
3424-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTag\\(\\) has parameter \\$sheetIndex with no type specified\\.$#"
3425-
count: 1
3426-
path: src/PhpSpreadsheet/Writer/Html.php
3427-
3428-
-
3429-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTagInline\\(\\) has no return type specified\\.$#"
3430-
count: 1
3431-
path: src/PhpSpreadsheet/Writer/Html.php
3432-
3433-
-
3434-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTagInline\\(\\) has parameter \\$id with no type specified\\.$#"
3435-
count: 1
3436-
path: src/PhpSpreadsheet/Writer/Html.php
3437-
3438-
-
3439-
message: "#^Parameter \\#1 \\$borderStyle of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:mapBorderStyle\\(\\) expects int, string given\\.$#"
3440-
count: 1
3441-
path: src/PhpSpreadsheet/Writer/Html.php
3442-
3443-
-
3444-
message: "#^Parameter \\#1 \\$font of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:createCSSStyleFont\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null given\\.$#"
3445-
count: 1
3446-
path: src/PhpSpreadsheet/Writer/Html.php
3447-
3448-
-
3449-
message: "#^Parameter \\#1 \\$hAlign of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:mapHAlign\\(\\) expects string, string\\|null given\\.$#"
3450-
count: 1
3451-
path: src/PhpSpreadsheet/Writer/Html.php
3452-
3453-
-
3454-
message: "#^Parameter \\#1 \\$vAlign of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:mapVAlign\\(\\) expects string, string\\|null given\\.$#"
3455-
count: 1
3456-
path: src/PhpSpreadsheet/Writer/Html.php
3457-
3458-
-
3459-
message: "#^Parameter \\#2 \\$length of function fread expects int\\<0, max\\>, int\\<0, max\\>\\|false given\\.$#"
3460-
count: 1
3461-
path: src/PhpSpreadsheet/Writer/Html.php
3462-
3463-
-
3464-
message: "#^Parameter \\#3 \\$use_include_path of function fopen expects bool, int given\\.$#"
3465-
count: 1
3466-
path: src/PhpSpreadsheet/Writer/Html.php
3467-
34683158
-
34693159
message: "#^Negated boolean expression is always false\\.$#"
34703160
count: 1

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ parameters:
1616
processTimeout: 300.0
1717
checkMissingIterableValueType: false
1818
ignoreErrors:
19-
- '~^Parameter \#1 \$im(age)? of function (imagedestroy|imageistruecolor|imagealphablending|imagesavealpha|imagecolortransparent|imagecolorsforindex|imagesavealpha|imagesx|imagesy) expects (GdImage|resource), GdImage\|resource given\.$~'
19+
- '~^Parameter \#1 \$im(age)? of function (imagedestroy|imageistruecolor|imagealphablending|imagesavealpha|imagecolortransparent|imagecolorsforindex|imagesavealpha|imagesx|imagesy|imagepng) expects (GdImage|resource), GdImage\|resource given\.$~'
2020
- '~^Parameter \#2 \$src_im(age)? of function imagecopy expects (GdImage|resource), GdImage\|resource given\.$~'
2121
# Accept a bit anything for assert methods
2222
- '~^Parameter \#2 .* of static method PHPUnit\\Framework\\Assert\:\:assert\w+\(\) expects .*, .* given\.$~'

0 commit comments

Comments
 (0)