Skip to content

Commit

Permalink
use static:: in application/ as well
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 12, 2018
1 parent 5501cd5 commit 1295d37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/Config/Mimes.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,12 @@ public static function guessTypeFromExtension(string $extension)
{
$extension = trim(strtolower($extension), '. ');

if (! array_key_exists($extension, self::$mimes))
if (! array_key_exists($extension, static::$mimes))
{
return null;
}

return is_array(self::$mimes[$extension]) ? self::$mimes[$extension][0] : self::$mimes[$extension];
return is_array(static::$mimes[$extension]) ? static::$mimes[$extension][0] : static::$mimes[$extension];
}

//--------------------------------------------------------------------
Expand All @@ -509,12 +509,12 @@ public static function guessExtensionFromType(string $type, ?string $proposed_ex

$proposed_extension = trim(strtolower($proposed_extension));

if (! is_null($proposed_extension) && array_key_exists($proposed_extension, self::$mimes) && in_array($type, is_string(self::$mimes[$proposed_extension]) ? [self::$mimes[$proposed_extension]] : self::$mimes[$proposed_extension]))
if (! is_null($proposed_extension) && array_key_exists($proposed_extension, static::$mimes) && in_array($type, is_string(static::$mimes[$proposed_extension]) ? [static::$mimes[$proposed_extension]] : static::$mimes[$proposed_extension]))
{
return $proposed_extension;
}

foreach (self::$mimes as $ext => $types)
foreach (static::$mimes as $ext => $types)
{
if (is_string($types) && $types === $type)
{
Expand Down

0 comments on commit 1295d37

Please sign in to comment.