Skip to content

Commit abe4f70

Browse files
committed
revert change responsetrait and baseline
1 parent 4e3c7ac commit abe4f70

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

system/API/ResponseTrait.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*
2727
* @property CLIRequest|IncomingRequest $request
2828
* @property ResponseInterface $response
29+
* @property bool $stringAsHtml Whether to treat string data as HTML in JSON response.
30+
* Setting `true` is only for backward compatibility.
2931
*/
3032
trait ResponseTrait
3133
{
@@ -82,12 +84,6 @@ trait ResponseTrait
8284
*/
8385
protected $formatter;
8486

85-
/**
86-
* Whether to treat string data as HTML in JSON response.
87-
* Setting `true` is only for backward compatibility.
88-
*/
89-
protected bool $stringAsHtml = false;
90-
9187
/**
9288
* Provides a single, simple method to return an API response, formatted
9389
* to match the requested format, with proper content-type and status code.

utils/phpstan-baseline/loader.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 2818 errors
1+
# total 2824 errors
22
includes:
33
- argument.type.neon
44
- assign.propertyType.neon

utils/phpstan-baseline/property.notFound.neon

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 59 errors
1+
# total 65 errors
22

33
parameters:
44
ignoreErrors:
@@ -17,6 +17,21 @@ parameters:
1717
count: 14
1818
path: ../../system/Database/SQLSRV/Forge.php
1919

20+
-
21+
message: '#^Access to an undefined property CodeIgniter\\Debug\\ExceptionHandler\:\:\$stringAsHtml\.$#'
22+
count: 1
23+
path: ../../system/Debug/ExceptionHandler.php
24+
25+
-
26+
message: '#^Access to an undefined property CodeIgniter\\Debug\\Exceptions\:\:\$stringAsHtml\.$#'
27+
count: 1
28+
path: ../../system/Debug/Exceptions.php
29+
30+
-
31+
message: '#^Access to an undefined property CodeIgniter\\RESTful\\ResourceController\:\:\$stringAsHtml\.$#'
32+
count: 1
33+
path: ../../system/RESTful/ResourceController.php
34+
2035
-
2136
message: '#^Access to an undefined property Config\\Session\:\:\$lockAttempts\.$#'
2237
count: 1
@@ -27,6 +42,21 @@ parameters:
2742
count: 1
2843
path: ../../system/Session/Handlers/RedisHandler.php
2944

45+
-
46+
message: '#^Access to an undefined property CodeIgniter\\Test\\Mock\\MockResourcePresenter\:\:\$stringAsHtml\.$#'
47+
count: 1
48+
path: ../../system/Test/Mock/MockResourcePresenter.php
49+
50+
-
51+
message: '#^Access to an undefined property class@anonymous/tests/system/API/ResponseTraitTest\.php\:123\:\:\$stringAsHtml\.$#'
52+
count: 1
53+
path: ../../tests/system/API/ResponseTraitTest.php
54+
55+
-
56+
message: '#^Access to an undefined property class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:\$stringAsHtml\.$#'
57+
count: 1
58+
path: ../../tests/system/API/ResponseTraitTest.php
59+
3060
-
3161
message: '#^Access to an undefined property Tests\\Support\\Commands\\AppInfo\:\:\$foobar\.$#'
3262
count: 2

0 commit comments

Comments
 (0)