Skip to content

Commit

Permalink
ImagickKernel::scale normalize_kernel is optional i.e. has a default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danack committed Jun 16, 2021
1 parent 2605370 commit a27492e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ImagickKernel.stub.php
Expand Up @@ -17,7 +17,7 @@ public static function fromMatrix(array $matrix, ?array $origin): ImagickKernel
public function getMatrix(): array {}

// NORMALIZE_KERNEL_
public function scale(float $scale, ?int $normalize_kernel): void {}
public function scale(float $scale, ?int $normalize_kernel = null): void {}

public function separate(): array {}
}
Expand Down
9 changes: 5 additions & 4 deletions ImagickKernel_arginfo.h
Expand Up @@ -91,9 +91,9 @@ ZEND_END_ARG_INFO()
#if defined(IMAGICK_WITH_KERNEL)

#if PHP_VERSION_ID >= 80000
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickKernel_scale, 0, 2, IS_VOID, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ImagickKernel_scale, 0, 1, IS_VOID, 0)
#else
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_scale, 0, 0, 2)
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_scale, 0, 0, 1)
#endif


Expand All @@ -102,12 +102,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ImagickKernel_scale, 0, 0, 2)
#else
ZEND_ARG_INFO(0, scale)
#endif

#if PHP_VERSION_ID >= 80000
ZEND_ARG_TYPE_INFO(0, normalize_kernel, IS_LONG, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, normalize_kernel, IS_LONG, 1, "null")
#else
ZEND_ARG_INFO(0, normalize_kernel)
#endif

ZEND_END_ARG_INFO()
#endif

Expand Down

0 comments on commit a27492e

Please sign in to comment.