From ab023cad8bc902e8822f639aceec1141012788c3 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 14 Aug 2023 16:39:07 +0000 Subject: [PATCH] replace \Closure with Callable --- Math/Numerics/Integration.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Math/Numerics/Integration.php b/Math/Numerics/Integration.php index ec7517993..4628539e1 100755 --- a/Math/Numerics/Integration.php +++ b/Math/Numerics/Integration.php @@ -31,13 +31,13 @@ final class Integration * @param float $from Start interval * @param float $to End interval * @param float $n Steps - * @param \Closure $func Function to integrate + * @param Callable $func Function to integrate * * @return float * * @since 1.0.0 */ - public static function intLeftRect(float $from, float $to, float $n, \Closure $func) : float + public static function intLeftRect(float $from, float $to, float $n, Callable $func) : float { $h = ($to - $from) / $n; $sum = 0.0; @@ -55,13 +55,13 @@ final class Integration * @param float $from Start interval * @param float $to End interval * @param float $n Steps - * @param \Closure $func Function to integrate + * @param Callable $func Function to integrate * * @return float * * @since 1.0.0 */ - public static function intRightRect(float $from, float $to, float $n, \Closure $func) : float + public static function intRightRect(float $from, float $to, float $n, Callable $func) : float { $h = ($to - $from) / $n; $sum = 0.0; @@ -79,13 +79,13 @@ final class Integration * @param float $from Start interval * @param float $to End interval * @param float $n Steps - * @param \Closure $func Function to integrate + * @param Callable $func Function to integrate * * @return float * * @since 1.0.0 */ - public static function intMiddleRect(float $from, float $to, float $n, \Closure $func) : float + public static function intMiddleRect(float $from, float $to, float $n, Callable $func) : float { $h = ($to - $from) / $n; $sum = 0.0; @@ -103,13 +103,13 @@ final class Integration * @param float $from Start interval * @param float $to End interval * @param float $n Steps - * @param \Closure $func Function to integrate + * @param Callable $func Function to integrate * * @return float * * @since 1.0.0 */ - public static function intTrapezium(float $from, float $to, float $n, \Closure $func) : float + public static function intTrapezium(float $from, float $to, float $n, Callable $func) : float { $h = ($to - $from) / $n; $sum = $func($from) + $func($to); @@ -127,13 +127,13 @@ final class Integration * @param float $from Start interval * @param float $to End interval * @param float $n Steps - * @param \Closure $func Function to integrate + * @param Callable $func Function to integrate * * @return float * * @since 1.0.0 */ - public static function intSimpson(float $from, float $to, float $n, \Closure $func) : float + public static function intSimpson(float $from, float $to, float $n, Callable $func) : float { $h = ($to - $from) / $n; $sum1 = 0.0;