Skip to content

Commit 6e29716

Browse files
committed
chore(app): PHPStan baseline
1 parent 4064c52 commit 6e29716

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

system/API/ResponseTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ protected function format($data = null)
326326
// if we don't have a formatter, make one
327327
$this->formatter ??= $format->getFormatter($mime);
328328

329-
// @phpstan-ignore function.impossibleType, function.alreadyNarrowedType (trait used in contexts with/without this property)
330329
$asHtml = property_exists($this, 'stringAsHtml') ? $this->stringAsHtml : false;
331330

332331
if (
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# total 2 errors
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Call to function property_exists\(\) with \$this\(class@anonymous/tests/system/API/ResponseTraitTest\.php\:188\) and ''stringAsHtml'' will always evaluate to true\.$#'
7+
count: 1
8+
path: ../../tests/system/API/ResponseTraitTest.php
9+
10+
-
11+
message: '#^Call to function property_exists\(\) with \$this\(class@anonymous/tests/system/API/ResponseTraitTest\.php\:308\) and ''stringAsHtml'' will always evaluate to true\.$#'
12+
count: 1
13+
path: ../../tests/system/API/ResponseTraitTest.php
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# total 3 errors
2+
3+
parameters:
4+
ignoreErrors:
5+
-
6+
message: '#^Call to function property_exists\(\) with \$this\(CodeIgniter\\Debug\\ExceptionHandler\) and ''stringAsHtml'' will always evaluate to false\.$#'
7+
count: 1
8+
path: ../../system/Debug/ExceptionHandler.php
9+
10+
-
11+
message: '#^Call to function property_exists\(\) with \$this\(class@anonymous/tests/system/API/ResponseTraitTest\.php\:130\) and ''stringAsHtml'' will always evaluate to false\.$#'
12+
count: 1
13+
path: ../../tests/system/API/ResponseTraitTest.php
14+
15+
-
16+
message: '#^Call to function property_exists\(\) with \$this\(class@anonymous/tests/system/API/ResponseTraitTest\.php\:628\) and ''stringAsHtml'' will always evaluate to false\.$#'
17+
count: 1
18+
path: ../../tests/system/API/ResponseTraitTest.php

utils/phpstan-baseline/loader.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 2767 errors
1+
# total 2766 errors
22

33
includes:
44
- argument.type.neon
@@ -10,6 +10,8 @@ includes:
1010
- codeigniter.superglobalAccessAssign.neon
1111
- deadCode.unreachable.neon
1212
- empty.notAllowed.neon
13+
- function.alreadyNarrowedType.neon
14+
- function.impossibleType.neon
1315
- method.alreadyNarrowedType.neon
1416
- method.childParameterType.neon
1517
- method.childReturnType.neon

0 commit comments

Comments
 (0)