File tree Expand file tree Collapse file tree 6 files changed +14
-51
lines changed Expand file tree Collapse file tree 6 files changed +14
-51
lines changed Original file line number Diff line number Diff line change @@ -3407,7 +3407,7 @@ protected function resetSelect()
3407
3407
'QBUnion ' => [],
3408
3408
]);
3409
3409
3410
- if (! empty ( $ this ->db ) ) {
3410
+ if ($ this ->db instanceof BaseConnection ) {
3411
3411
$ this ->db ->setAliasedTables ([]);
3412
3412
}
3413
3413
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ abstract class BaseHandler implements ImageHandlerInterface
34
34
/**
35
35
* The image/file instance
36
36
*
37
- * @var Image
37
+ * @var Image|null
38
38
*/
39
39
protected $ image ;
40
40
@@ -138,6 +138,8 @@ public function __construct($config = null)
138
138
* Sets another image for this handler to work on.
139
139
* Keeps us from needing to continually instantiate the handler.
140
140
*
141
+ * @phpstan-assert Image $this->image
142
+ *
141
143
* @return $this
142
144
*/
143
145
public function withFile (string $ path )
@@ -176,7 +178,7 @@ public function getFile()
176
178
/**
177
179
* Verifies that a file has been supplied and it is an image.
178
180
*
179
- * @return Image The image instance
181
+ * @phpstan-assert Image $this-> image
180
182
*
181
183
* @throws ImageException
182
184
*/
@@ -187,7 +189,7 @@ protected function image(): Image
187
189
}
188
190
189
191
// Verify withFile has been called
190
- if (empty ( $ this ->image ) ) {
192
+ if ($ this ->image === null ) {
191
193
throw ImageException::forMissingImage ();
192
194
}
193
195
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ protected function setUpControllerTestTrait(): void
95
95
// The URL helper is always loaded by the system so ensure it is available.
96
96
helper ('url ' );
97
97
98
- if (empty ( $ this ->appConfig ) ) {
98
+ if (! $ this ->appConfig instanceof App ) {
99
99
$ this ->appConfig = config (App::class);
100
100
}
101
101
@@ -104,7 +104,7 @@ protected function setUpControllerTestTrait(): void
104
104
$ this ->uri = $ factory ->createFromGlobals ();
105
105
}
106
106
107
- if (empty ( $ this ->request ) ) {
107
+ if (! $ this ->request instanceof IncomingRequest ) {
108
108
// Do some acrobatics, so we can use the Request service with our own URI
109
109
$ tempUri = service ('uri ' );
110
110
Services::injectMock ('uri ' , $ this ->uri );
@@ -115,11 +115,11 @@ protected function setUpControllerTestTrait(): void
115
115
Services::injectMock ('uri ' , $ tempUri );
116
116
}
117
117
118
- if (empty ( $ this ->response ) ) {
118
+ if (! $ this ->response instanceof ResponseInterface ) {
119
119
$ this ->response = service ('response ' , $ this ->appConfig , false );
120
120
}
121
121
122
- if (empty ( $ this ->logger ) ) {
122
+ if (! $ this ->logger instanceof LoggerInterface ) {
123
123
$ this ->logger = service ('logger ' );
124
124
}
125
125
}
Original file line number Diff line number Diff line change 1
- # total 271 errors
1
+ # total 265 errors
2
2
3
3
parameters :
4
4
ignoreErrors :
@@ -39,7 +39,7 @@ parameters:
39
39
40
40
-
41
41
message : ' #^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
42
- count : 29
42
+ count : 28
43
43
path : ../../system/Database/BaseBuilder.php
44
44
45
45
-
@@ -289,7 +289,7 @@ parameters:
289
289
290
290
-
291
291
message : ' #^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
292
- count : 3
292
+ count : 2
293
293
path : ../../system/Images/Handlers/BaseHandler.php
294
294
295
295
-
@@ -367,11 +367,6 @@ parameters:
367
367
count : 1
368
368
path : ../../tests/system/Session/SessionTest.php
369
369
370
- -
371
- message : ' #^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
372
- count : 4
373
- path : ../../tests/system/Test/ControllerTestTraitTest.php
374
-
375
370
-
376
371
message : ' #^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
377
372
count : 1
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- # total 3760 errors
1
+ # total 3748 errors
2
2
includes :
3
3
- argument.type.neon
4
4
- assign.propertyType.neon
@@ -10,7 +10,6 @@ includes:
10
10
- codeigniter.unknownServiceMethod.neon
11
11
- deadCode.unreachable.neon
12
12
- empty.notAllowed.neon
13
- - empty.property.neon
14
13
- function.alreadyNarrowedType.neon
15
14
- generator.valueType.neon
16
15
- isset.property.neon
You can’t perform that action at this time.
0 commit comments