Skip to content

Commit 1cbbb56

Browse files
authored
PHP 8.4 compatibility
2 parents 855ee9e + 92a64a8 commit 1cbbb56

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Classes/Controller/DummyImageController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class DummyImageController extends ActionController
6262
*
6363
* @return string
6464
*/
65-
public function imageAction(int $w = 600, int $h = 400, string $bg = '#000', string $fg = '#fff', string $t = null, string $f = 'png'): string
65+
public function imageAction(int $w = 600, int $h = 400, string $bg = '#000', string $fg = '#fff', ?string $t = null, string $f = 'png'): string
6666
{
6767
try {
6868
$dummyImage = $this->dummyImageService->createDummyImage($w, $h, $bg, $fg, $t, $f);

Classes/Domain/AbstractScalableImageSource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ abstract class AbstractScalableImageSource extends AbstractImageSource implement
4242
*
4343
* @return ScalableImageSourceInterface
4444
*/
45-
public function withWidth(int $targetWidth = null, bool $preserveAspect = false): ScalableImageSourceInterface
45+
public function withWidth(?int $targetWidth = null, bool $preserveAspect = false): ScalableImageSourceInterface
4646
{
4747
$newSource = clone $this;
4848
$newSource->targetWidth = $targetWidth;
@@ -64,7 +64,7 @@ public function withWidth(int $targetWidth = null, bool $preserveAspect = false)
6464
*
6565
* @return ScalableImageSourceInterface
6666
*/
67-
public function withHeight(int $targetHeight = null, bool $preserveAspect = false): ScalableImageSourceInterface
67+
public function withHeight(?int $targetHeight = null, bool $preserveAspect = false): ScalableImageSourceInterface
6868
{
6969
$newSource = clone $this;
7070
$newSource->targetHeight = $targetHeight;

Classes/Domain/DummyImageGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function initializeObject(): void
6666
*
6767
* @return ?ImageInterface
6868
*/
69-
public function createDummyImage(int $w = 600, int $h = 400, string $bg = '#000', string $fg = '#fff', string $t = null, string $f = 'png'): ?ImageInterface
69+
public function createDummyImage(int $w = 600, int $h = 400, string $bg = '#000', string $fg = '#fff', ?string $t = null, string $f = 'png'): ?ImageInterface
7070
{
7171
// limit input arguments
7272
if ($w > 9999) {

0 commit comments

Comments
 (0)