Use new code style
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
// Exit if accessed directly
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
use \Mexitek\PHPColors\Color;
|
||||
use Mexitek\PHPColors\Color;
|
||||
|
||||
/**
|
||||
* Returns a Color object.
|
||||
@ -27,18 +27,13 @@ use \Mexitek\PHPColors\Color;
|
||||
function wu_color($hex) {
|
||||
|
||||
try {
|
||||
|
||||
$color = new Color($hex);
|
||||
|
||||
} catch (Exception $exception) {
|
||||
|
||||
$color = new Color('#f9f9f9');
|
||||
|
||||
} // end try;
|
||||
}
|
||||
|
||||
return $color;
|
||||
|
||||
} // end wu_color;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a random color for the progress bar.
|
||||
@ -61,5 +56,4 @@ function wu_get_random_color($index) {
|
||||
);
|
||||
|
||||
return wu_get_isset($colors, $index, $colors[ rand(0, count($colors) - 1) ]);
|
||||
|
||||
} // end wu_get_random_color;
|
||||
}
|
||||
|
Reference in New Issue
Block a user