From d9c7bd0b507b3c8972fd6567a3386f9dd62bb308 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 30 Mar 2018 13:32:15 +0200 Subject: [PATCH] Phpstan fixes --- Math/Matrix/Matrix.php | 2 +- Math/Number/Complex.php | 2 +- Math/Statistic/MeasureOfDispersion.php | 4 ++-- Security/PhpCode.php | 4 ++-- Socket/Packets/Header.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index f462358d5..d6ba2b464 100644 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -501,7 +501,7 @@ class Matrix implements \ArrayAccess, \Iterator */ public function inverse(int $algorithm = InverseType::GAUSS_JORDAN) : Matrix { - return $this->solve(new IdentityMatrix($this->m, $this->m)); + return $this->solve(new IdentityMatrix($this->m)); } /** diff --git a/Math/Number/Complex.php b/Math/Number/Complex.php index d5bbab55c..6de4dea8e 100644 --- a/Math/Number/Complex.php +++ b/Math/Number/Complex.php @@ -143,7 +143,7 @@ class Complex */ public function square() : Complex { - return $this->multComplex($this, $this); + return $this->multComplex($this); } public function pow($value) : Complex diff --git a/Math/Statistic/MeasureOfDispersion.php b/Math/Statistic/MeasureOfDispersion.php index a14040e3f..a369c67dc 100644 --- a/Math/Statistic/MeasureOfDispersion.php +++ b/Math/Statistic/MeasureOfDispersion.php @@ -175,8 +175,8 @@ class MeasureOfDispersion * * @param array $x Values * @param array $y Values - * @param array $meanX Mean - * @param array $meanY Mean + * @param float $meanX Mean + * @param float $meanY Mean * * @return float * diff --git a/Security/PhpCode.php b/Security/PhpCode.php index ebedc8584..d6aaced57 100644 --- a/Security/PhpCode.php +++ b/Security/PhpCode.php @@ -121,8 +121,8 @@ class PhpCode * * @since 1.0.0 */ - public static function validateFileIntegrity(string $source, string $hash) : array + public static function validateFileIntegrity(string $source, string $hash) : bool { - + return true; } } diff --git a/Socket/Packets/Header.php b/Socket/Packets/Header.php index 6cc0545a2..63e01a8f3 100644 --- a/Socket/Packets/Header.php +++ b/Socket/Packets/Header.php @@ -41,7 +41,7 @@ class Header implements \Serializable /** * Packet type. * - * @var \phpOMS\Socket\Packets\PacketType + * @var int * @since 1.0.0 */ private $type = 0;