File tree Expand file tree Collapse file tree 4 files changed +58
-0
lines changed
Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,9 @@ jobs:
322322 - script : |
323323 cd e2e/bug-11819
324324 ../../bin/phpstan
325+ - script : |
326+ cd e2e/bug-12629
327+ ../../bin/phpstan
325328
326329 steps :
327330 - name : " Checkout"
Original file line number Diff line number Diff line change 1+ parameters :
2+ ignoreErrors :
3+ -
4+ message : ' #^Method Bug12629\\Bug12629\:\:is_macintosh_enc\(\) has no return type specified\.$#'
5+ identifier : missingType.return
6+ count : 1
7+ path : src/bug-12629.php
8+
9+ -
10+ message : ' #^Method Bug12629\\Bug12629\:\:is_macintosh_enc\(\) has parameter \$s with no type specified\.$#'
11+ identifier : missingType.parameter
12+ count : 1
13+ path : src/bug-12629.php
14+
15+ -
16+ message : ' #^Method Bug12629\\Bug12629\:\:is_macintosh_enc\(\) is unused\.$#'
17+ identifier : method.unused
18+ count : 1
19+ path : src/bug-12629.php
20+
21+ -
22+ message : ' #^Regex pattern is invalid\: Compilation failed\: UTF\-8 error\: byte 2 top bits not 0x80 at offset 0 in pattern\: \!Ã\[€\-Ÿ\]\!u$#'
23+ identifier : regexp.pattern
24+ count : 1
25+ path : src/bug-12629.php
26+
27+ -
28+ message : ' #^Regex pattern is invalid\: Compilation failed\: UTF\-8 error\: isolated byte with 0x80 bit set at offset 1 in pattern\: \!\[€\-Ÿ\]\!u$#'
29+ identifier : regexp.pattern
30+ count : 1
31+ path : src/bug-12629.php
Original file line number Diff line number Diff line change 1+ includes :
2+ - phpstan-baseline.neon
3+
4+ parameters :
5+ level : 8
6+ paths :
7+ - src
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Bug12629 ;
4+
5+ class Bug12629 {
6+ private function is_macintosh_enc ($ s ) {
7+
8+ if (!is_string ($ s )) {
9+ return false ;
10+ }
11+
12+ preg_match_all ("![ \x80- \x9f]!u " , $ s , $ matchesMacintosh );
13+ preg_match_all ("! \xc3[ \x80- \x9f]!u " , $ s , $ matchesUtf8 );
14+
15+ return count ($ matchesMacintosh [0 ]) > 0 && 0 == count ($ matchesUtf8 [0 ]);
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments