remove unneeded (int) casting as already use int type hint or certainly an int

This commit is contained in:
Abdul Malik Ikhsan 2018-08-05 18:35:58 +07:00
parent 0f98889e63
commit 72657ab02d
No known key found for this signature in database
GPG Key ID: 23FCCC74D1442CAE
3 changed files with 4 additions and 4 deletions

View File

@ -552,7 +552,7 @@ class CodeIgniter
*/
public static function cache(int $time)
{
self::$cacheTTL = (int) $time;
self::$cacheTTL = $time;
}
//--------------------------------------------------------------------

View File

@ -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;
}
}

View File

@ -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]]);
}
//--------------------------------------------------------------------