mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
remove unneeded (int) casting as already use int type hint or certainly an int
This commit is contained in:
parent
0f98889e63
commit
72657ab02d
@ -552,7 +552,7 @@ class CodeIgniter
|
||||
*/
|
||||
public static function cache(int $time)
|
||||
{
|
||||
self::$cacheTTL = (int) $time;
|
||||
self::$cacheTTL = $time;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -952,7 +952,7 @@ class URI
|
||||
if ( ! is_null($parts['port']))
|
||||
{
|
||||
// Valid port numbers are enforced by earlier parse_url or setPort()
|
||||
$port = (int) $parts['port'];
|
||||
$port = $parts['port'];
|
||||
$this->port = $port;
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ class Filters
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function local_number($value, string $type='decimal', $precision=4, string $locale = null): string
|
||||
public static function local_number($value, string $type='decimal', int $precision=4, string $locale = null): string
|
||||
{
|
||||
helper('number');
|
||||
|
||||
@ -236,7 +236,7 @@ class Filters
|
||||
'duration' => \NumberFormatter::DURATION,
|
||||
];
|
||||
|
||||
return format_number($value, (int)$precision, $locale, ['type' => $types[$type]]);
|
||||
return format_number($value, $precision, $locale, ['type' => $types[$type]]);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user