basic code cleanup.
This commit is contained in:
parent
e69f988fe5
commit
157f619e98
|
@ -285,8 +285,7 @@ public static function latest($directory, $options = fIterator::SKIP_DOTS)
|
||||||
|
|
||||||
// To get the latest created file, we'll simply spin through the
|
// To get the latest created file, we'll simply spin through the
|
||||||
// directory, setting the latest file if we encounter a file
|
// directory, setting the latest file if we encounter a file
|
||||||
// with a UNIX timestamp greater than the latest one we
|
// with a UNIX timestamp greater than the latest one.
|
||||||
// have encountered thus far in the loop.
|
|
||||||
foreach ($items as $item)
|
foreach ($items as $item)
|
||||||
{
|
{
|
||||||
if ($item->getMTime() > $time) $latest = $item;
|
if ($item->getMTime() > $time) $latest = $item;
|
||||||
|
|
|
@ -23,8 +23,7 @@ public static function make($value, $rounds = 8)
|
||||||
|
|
||||||
// Bcrypt expects the salt to be 22 base64 encoded characters including
|
// Bcrypt expects the salt to be 22 base64 encoded characters including
|
||||||
// dots and slashes. We will get rid of the plus signs included in the
|
// dots and slashes. We will get rid of the plus signs included in the
|
||||||
// base64 data and replace them with dots. OpenSSL will be used if it
|
// base64 data and replace them with dots.
|
||||||
// is available on the server.
|
|
||||||
if (function_exists('openssl_random_pseudo_bytes'))
|
if (function_exists('openssl_random_pseudo_bytes'))
|
||||||
{
|
{
|
||||||
$salt = openssl_random_pseudo_bytes(16);
|
$salt = openssl_random_pseudo_bytes(16);
|
||||||
|
|
|
@ -205,7 +205,7 @@ protected static function convention($action, $parameters)
|
||||||
|
|
||||||
// We'll replace both dots and @ signs in the URI since both are used
|
// We'll replace both dots and @ signs in the URI since both are used
|
||||||
// to specify the controller and action, and by convention should be
|
// to specify the controller and action, and by convention should be
|
||||||
// translated into URI slashes.
|
// translated into URI slashes for the URL.
|
||||||
$uri = $root.'/'.str_replace(array('.', '@'), '/', $action);
|
$uri = $root.'/'.str_replace(array('.', '@'), '/', $action);
|
||||||
|
|
||||||
$uri = static::to(str_finish($uri, '/').$parameters);
|
$uri = static::to(str_finish($uri, '/').$parameters);
|
||||||
|
|
Loading…
Reference in New Issue