[PECL-CVS] [pecl-math-stats] master: Merge pull request #8 from mikhainin/fix-return-type
[email protected] (Rasmus Lerdorf via GitHub) Tue, 21 Apr 2026 02:51:00 +0000
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Rasmus Lerdorf (rlerdorf)
Committer: GitHub (web-flow)
Pusher: rlerdorf
Date: 2026-04-21T03:50:55+01:00
Commit: https://github.com/php/pecl-math-stats/commit/fcd42cd41cc41be8c1c8da3b2a6cb0e49ce85467
Raw diff: https://github.com/php/pecl-math-stats/commit/fcd42cd41cc41be8c1c8da3b2a6cb0e49ce85467.diff
Merge pull request #8 from mikhainin/fix-return-type
Fixed return type for stats_rand_gen_t()
Changed paths:
M stats.stub.php
M stats_arginfo.h
Diff:
diff --git a/stats.stub.php b/stats.stub.php
index 8b6b006..2071100 100644
--- a/stats.stub.php
+++ b/stats.stub.php
@@ -43,7 +43,7 @@ function stats_rand_ibinomial(int $n, float $pp): int|false {}
function stats_rand_ibinomial_negative(int $n, float $p): int|false {}
function stats_rand_gen_ipoisson(float $mu): int|false {}
function stats_rand_gen_noncentral_t(float $df, float $xnonc): float|false {}
-function stats_rand_gen_t(float $df): array|false {}
+function stats_rand_gen_t(float $df): float|false {}
function stats_dens_normal(float $x, float $ave, float $stdev): float|false {}
function stats_dens_cauchy(float $x, float $ave, float $stdev): float|false {}
function stats_dens_laplace(float $x, float $ave, float $stdev): float|false {}
diff --git a/stats_arginfo.h b/stats_arginfo.h
index 3c99ebf..ab92a6b 100644
--- a/stats_arginfo.h
+++ b/stats_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: e6cfe06b9c3e187348f16fd6a34bb7eafc5042d9 */
+ * Stub hash: 2dca8eb298b57b9da45d9270b4bc97de0faad1aa */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stats_cdf_t, 0, 3, MAY_BE_DOUBLE|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, par1, IS_DOUBLE, 0)
@@ -137,9 +137,7 @@ ZEND_END_ARG_INFO()
#define arginfo_stats_rand_gen_noncentral_t arginfo_stats_rand_gen_noncentral_chisquare
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stats_rand_gen_t, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO(0, df, IS_DOUBLE, 0)
-ZEND_END_ARG_INFO()
+#define arginfo_stats_rand_gen_t arginfo_stats_rand_gen_chisquare
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stats_dens_normal, 0, 3, MAY_BE_DOUBLE|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, x, IS_DOUBLE, 0)