strval -> cast
This commit is contained in:
parent
d166428729
commit
a0b3a08d7f
6 changed files with 9 additions and 9 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.2301.11859
|
||||
0.2301.11953
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
// AString.php
|
||||
// Created: 2021-04-26
|
||||
// Updated: 2022-02-27
|
||||
// Updated: 2023-01-01
|
||||
|
||||
namespace Index;
|
||||
|
||||
|
@ -269,6 +269,6 @@ final class AString implements IString {
|
|||
return $value;
|
||||
if($value instanceof WString)
|
||||
return $value->toAString();
|
||||
return new AString(strval($value));
|
||||
return new AString((string)$value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ abstract class MariaDBResult implements IDbResult {
|
|||
}
|
||||
|
||||
public function getString(int|string $index): string {
|
||||
return strval($this->getValue($index));
|
||||
return (string)$this->getValue($index);
|
||||
}
|
||||
|
||||
public function getAString(int|string $index): AString {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
// MariaDBStatement.php
|
||||
// Created: 2021-05-02
|
||||
// Updated: 2022-02-27
|
||||
// Updated: 2023-01-01
|
||||
|
||||
namespace Index\Data\MariaDB;
|
||||
|
||||
|
@ -130,7 +130,7 @@ class MariaDBStatement implements IDbStatement {
|
|||
while($data = fread($value, 8192))
|
||||
$this->statement->send_long_data($key, $data);
|
||||
} else
|
||||
$this->statement->send_long_data($key, strval($value));
|
||||
$this->statement->send_long_data($key, (string)$value);
|
||||
|
||||
$value = null;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class SQLiteResult implements IDbResult {
|
|||
}
|
||||
|
||||
public function getString(int|string $index): string {
|
||||
return strval($this->getValue($index));
|
||||
return (string)$this->getValue($index);
|
||||
}
|
||||
|
||||
public function getAString(int|string $index): AString {
|
||||
|
|
|
@ -53,7 +53,7 @@ class BencodeSerialiser extends Serialiser {
|
|||
} else {
|
||||
$output = 'd';
|
||||
foreach($input as $key => $value) {
|
||||
$output .= self::encode(strval($key), $depth - 1);
|
||||
$output .= self::encode((string)$key, $depth - 1);
|
||||
$output .= self::encode($value, $depth - 1);
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class BencodeSerialiser extends Serialiser {
|
|||
$output = 'd';
|
||||
|
||||
foreach($input as $key => $value) {
|
||||
$output .= self::encode(strval($key), $depth - 1);
|
||||
$output .= self::encode((string)$key, $depth - 1);
|
||||
$output .= self::encode($value, $depth - 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue