Skip to content

Commit 6b1884a

Browse files
apply the code suggestions from the review
Co-authored-by: John Paul E. Balandan, CPA <[email protected]>
1 parent 4cff117 commit 6b1884a

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

system/Images/Handlers/ImageMagickHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function _resize(bool $maintainRatio = false)
162162
/**
163163
* Crops the image.
164164
*
165-
* @return ImageMagickHandler
165+
* @return $this
166166
*
167167
* @throws ImagickException
168168
*/
@@ -276,7 +276,7 @@ protected function _flip(string $direction)
276276
/**
277277
* Get a driver version
278278
*
279-
* @return mixed
279+
* @return string
280280
*/
281281
public function getVersion()
282282
{
@@ -286,7 +286,7 @@ public function getVersion()
286286
return $matches[1];
287287
}
288288

289-
return false;
289+
return '';
290290
}
291291

292292
/**

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 3521 errors
1+
# total 3519 errors
22
includes:
33
- argument.type.neon
44
- assign.propertyType.neon

utils/phpstan-baseline/method.childReturnType.neon

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 39 errors
1+
# total 37 errors
22

33
parameters:
44
ignoreErrors:
@@ -137,21 +137,11 @@ parameters:
137137
count: 1
138138
path: ../../system/Images/Handlers/BaseHandler.php
139139

140-
-
141-
message: '#^Return type \(CodeIgniter\\Images\\Handlers\\ImageMagickHandler\) of method CodeIgniter\\Images\\Handlers\\ImageMagickHandler\:\:_crop\(\) should be covariant with return type \(\$this\(CodeIgniter\\Images\\Handlers\\BaseHandler\)\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:_crop\(\)$#'
142-
count: 1
143-
path: ../../system/Images/Handlers/ImageMagickHandler.php
144-
145140
-
146141
message: '#^Return type \(CodeIgniter\\Images\\Handlers\\ImageMagickHandler\) of method CodeIgniter\\Images\\Handlers\\ImageMagickHandler\:\:_resize\(\) should be covariant with return type \(\$this\(CodeIgniter\\Images\\Handlers\\BaseHandler\)\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:_resize\(\)$#'
147142
count: 1
148143
path: ../../system/Images/Handlers/ImageMagickHandler.php
149144

150-
-
151-
message: '#^Return type \(mixed\) of method CodeIgniter\\Images\\Handlers\\ImageMagickHandler\:\:getVersion\(\) should be covariant with return type \(string\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:getVersion\(\)$#'
152-
count: 1
153-
path: ../../system/Images/Handlers/ImageMagickHandler.php
154-
155145
-
156146
message: '#^Return type \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Model\:\:__call\(\) should be covariant with return type \(\$this\(CodeIgniter\\BaseModel\)\|null\) of method CodeIgniter\\BaseModel\:\:__call\(\)$#'
157147
count: 1

0 commit comments

Comments
 (0)