Skip to content

Commit

Permalink
Update phpstan baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed May 16, 2024
1 parent 956da4f commit 750a2f5
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Webtrees.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Webtrees

// We want to know about all PHP errors during development, and fewer in production.
// Several of our libaries (e.g. laravel) give deprecations for PHP 8.4, and won't be fixed.
public const ERROR_REPORTING = (self::DEBUG && PHP_VERSION_ID < 80400)? E_ALL : E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED;
public const ERROR_REPORTING = (self::DEBUG && PHP_VERSION_ID < 80400) ? E_ALL : E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED;

// Page layouts for various page types.
public const LAYOUT_ADMINISTRATION = 'layouts/administration';
Expand Down
44 changes: 42 additions & 2 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1191,10 +1191,15 @@ parameters:
path: app/Individual.php

-
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|null given\\.$#"
message: "#^Parameter \\#1 \\$str of function substr_replace expects array\\|string, string\\|null given\\.$#"
count: 2
path: app/Individual.php

-
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|null given\\.$#"
count: 4
path: app/Individual.php

-
message: "#^Parameter \\#2 \\$subject of function preg_match expects string, string\\|null given\\.$#"
count: 1
Expand All @@ -1215,6 +1220,11 @@ parameters:
count: 2
path: app/Individual.php

-
message: "#^Property Fisharebest\\\\Webtrees\\\\GedcomRecord\\:\\:\\$getAllNames \\(array\\<array\\<string\\>\\>\\) does not accept array\\<array\\<string\\|null\\>\\>\\.$#"
count: 1
path: app/Individual.php

-
message: "#^Cannot call method has\\(\\) on mixed\\.$#"
count: 1
Expand Down Expand Up @@ -2320,6 +2330,31 @@ parameters:
count: 1
path: app/Report/ReportParserBase.php

-
message: "#^Parameter \\#1 \\$parser of function xml_get_current_line_number expects resource, XMLParser given\\.$#"
count: 1
path: app/Report/ReportParserBase.php

-
message: "#^Parameter \\#1 \\$parser of function xml_get_error_code expects resource, XMLParser given\\.$#"
count: 1
path: app/Report/ReportParserBase.php

-
message: "#^Parameter \\#1 \\$parser of function xml_parse expects resource, XMLParser given\\.$#"
count: 1
path: app/Report/ReportParserBase.php

-
message: "#^Parameter \\#1 \\$parser of function xml_parser_free expects resource, XMLParser given\\.$#"
count: 1
path: app/Report/ReportParserBase.php

-
message: "#^Parameter \\#1 \\$parser of function xml_set_character_data_handler expects resource, XMLParser given\\.$#"
count: 1
path: app/Report/ReportParserBase.php

-
message: "#^Property Fisharebest\\\\Webtrees\\\\Report\\\\ReportParserBase\\:\\:\\$xml_parser \\(XMLParser\\) does not accept resource\\.$#"
count: 1
Expand Down Expand Up @@ -2765,6 +2800,11 @@ parameters:
count: 2
path: app/Services/GedcomEditService.php

-
message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#"
count: 1
path: app/Services/GedcomExportService.php

-
message: "#^Parameter \\#1 \\$fp of function stream_get_meta_data expects resource, resource\\|false given\\.$#"
count: 1
Expand Down Expand Up @@ -3541,6 +3581,6 @@ parameters:
path: app/Validator.php

-
message: "#^Ternary operator condition is always true\\.$#"
message: "#^Left side of && is always true\\.$#"
count: 1
path: app/Webtrees.php

0 comments on commit 750a2f5

Please sign in to comment.