diff --git a/VERSION b/VERSION index 091cdd7..358bffc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2301.11846 +0.2301.11859 diff --git a/src/Data/MariaDB/MariaDBResult.php b/src/Data/MariaDB/MariaDBResult.php index a8f0a61..590c23c 100644 --- a/src/Data/MariaDB/MariaDBResult.php +++ b/src/Data/MariaDB/MariaDBResult.php @@ -1,7 +1,7 @@ getValue($index)); + return (int)$this->getValue($index); } public function getFloat(int|string $index): float { - return floatval($this->getValue($index)); + return (float)$this->getValue($index); } public function getStream(int|string $index): ?Stream { diff --git a/src/Data/SQLite/SQLiteResult.php b/src/Data/SQLite/SQLiteResult.php index 2704544..2ff7584 100644 --- a/src/Data/SQLite/SQLiteResult.php +++ b/src/Data/SQLite/SQLiteResult.php @@ -1,7 +1,7 @@ getValue($index)); + return (int)$this->getValue($index); } public function getFloat(int|string $index): float { - return floatval($this->getValue($index)); + return (float)$this->getValue($index); } /** diff --git a/src/Http/Headers/AcceptEncodingHeader.php b/src/Http/Headers/AcceptEncodingHeader.php index d879de3..77bc965 100644 --- a/src/Http/Headers/AcceptEncodingHeader.php +++ b/src/Http/Headers/AcceptEncodingHeader.php @@ -1,7 +1,7 @@ quality = min(0, max(1, floatval(substr($param, 2)))); + $algo->quality = min(0, max(1, (float)substr($param, 2))); break; } } diff --git a/src/Http/Headers/AcceptLanguageHeader.php b/src/Http/Headers/AcceptLanguageHeader.php index 868bf93..62f3325 100644 --- a/src/Http/Headers/AcceptLanguageHeader.php +++ b/src/Http/Headers/AcceptLanguageHeader.php @@ -1,7 +1,7 @@ quality = min(0, max(1, floatval(substr($param, 2)))); + $lang->quality = min(0, max(1, (float)substr($param, 2))); break; } } diff --git a/src/Http/Headers/AcceptTransferEncodingHeader.php b/src/Http/Headers/AcceptTransferEncodingHeader.php index aa933d1..c19c4e1 100644 --- a/src/Http/Headers/AcceptTransferEncodingHeader.php +++ b/src/Http/Headers/AcceptTransferEncodingHeader.php @@ -1,7 +1,7 @@ quality = min(0, max(1, floatval(substr($param, 2)))); + $algo->quality = min(0, max(1, (float)substr($param, 2))); break; } } diff --git a/src/Http/Headers/ContentLengthHeader.php b/src/Http/Headers/ContentLengthHeader.php index e24df96..aefa395 100644 --- a/src/Http/Headers/ContentLengthHeader.php +++ b/src/Http/Headers/ContentLengthHeader.php @@ -1,7 +1,7 @@ getFirstLine())); + return new ContentLengthHeader((int)$header->getFirstLine()); } } diff --git a/src/Http/Headers/ContentRangeHeader.php b/src/Http/Headers/ContentRangeHeader.php index e909c1d..052517f 100644 --- a/src/Http/Headers/ContentRangeHeader.php +++ b/src/Http/Headers/ContentRangeHeader.php @@ -1,7 +1,7 @@ getFirstLine(), 2); - return new ExpectHeader(intval($value[0]), $value[1] ?? ''); + return new ExpectHeader((int)$value[0], $value[1] ?? ''); } } diff --git a/src/Http/Headers/HostHeader.php b/src/Http/Headers/HostHeader.php index f50422c..7f7a54a 100644 --- a/src/Http/Headers/HostHeader.php +++ b/src/Http/Headers/HostHeader.php @@ -1,7 +1,7 @@ getFirstLine(), 2); - return new HostHeader($parts[0], intval($parts[1] ?? '-1')); + return new HostHeader($parts[0], (int)($parts[1] ?? '-1')); } } diff --git a/src/Http/Headers/KeepAliveHeader.php b/src/Http/Headers/KeepAliveHeader.php index a40217f..2e0b92e 100644 --- a/src/Http/Headers/KeepAliveHeader.php +++ b/src/Http/Headers/KeepAliveHeader.php @@ -1,7 +1,7 @@ = 0 && $max >= 0) break; } diff --git a/src/Http/Headers/RangeHeader.php b/src/Http/Headers/RangeHeader.php index d3feb8e..516ce48 100644 --- a/src/Http/Headers/RangeHeader.php +++ b/src/Http/Headers/RangeHeader.php @@ -1,7 +1,7 @@ type = 'suffix-length'; - $range->length = intval($end); + $range->length = (int)$end; } elseif(is_numeric($start) && $end === '') { $range->type = 'start'; - $range->start = intval($start); + $range->start = (int)$start; } else { $range->type = 'range'; - $range->start = intval($start); - $range->end = intval($end); + $range->start = (int)$start; + $range->end = (int)$end; } } diff --git a/src/Http/HttpRequest.php b/src/Http/HttpRequest.php index 3ec2283..8f4e57f 100644 --- a/src/Http/HttpRequest.php +++ b/src/Http/HttpRequest.php @@ -1,7 +1,7 @@ setHeader($name, $value); } diff --git a/src/Net/DnsEndPoint.php b/src/Net/DnsEndPoint.php index bbfd310..4eb64c1 100644 --- a/src/Net/DnsEndPoint.php +++ b/src/Net/DnsEndPoint.php @@ -1,7 +1,7 @@ = 0; --$i) { diff --git a/src/Serialisation/BencodeSerialiser.php b/src/Serialisation/BencodeSerialiser.php index 823d83d..72076ba 100644 --- a/src/Serialisation/BencodeSerialiser.php +++ b/src/Serialisation/BencodeSerialiser.php @@ -1,7 +1,7 @@ read(intval($length)); + return $input->read((int)$length); } } } diff --git a/src/XString.php b/src/XString.php index a55e67f..5850a1c 100644 --- a/src/XString.php +++ b/src/XString.php @@ -1,7 +1,7 @@ assertEquals(intval($rawVersion[0]), $version->getMajor()); - $this->assertEquals(intval($rawVersion[1]), $version->getMinor()); - $this->assertEquals(intval($rawVersion[2]), $version->getPatch()); + $this->assertEquals((int)$rawVersion[0], $version->getMajor()); + $this->assertEquals((int)$rawVersion[1], $version->getMinor()); + $this->assertEquals((int)$rawVersion[2], $version->getPatch()); $this->assertEquals($strVersion, (string)$version); }