Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public function displayCache($config)
*/
public static function cache(int $time)
{
self::$cacheTTL = (int) $time;
self::$cacheTTL = $time;
}

//--------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions system/HTTP/URI.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ public function setHost(string $str)
*
* @return $this
*/
public function setPort($port)
public function setPort(int $port = null)
{
if (is_null($port))
{
Expand Down Expand Up @@ -952,7 +952,7 @@ protected function applyParts($parts)
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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions system/View/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public static function limit_words($value, int $limit = 100): string
*
* @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');

Expand All @@ -236,7 +236,7 @@ public static function local_number($value, string $type='decimal', $precision=4
'duration' => \NumberFormatter::DURATION,
];

return format_number($value, (int)$precision, $locale, ['type' => $types[$type]]);
return format_number($value, $precision, $locale, ['type' => $types[$type]]);
}

//--------------------------------------------------------------------
Expand Down