mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
PHP/Core
* enforced v7.1 compliance, preparations for v7.2 * removed deprecated usage of each() * prefer array deconstruction via [] instead of calling list() * try to catch failed session_start() * prefer ... - Token instead of calling func_get_args() func_num_args() * enforce return types in AjaxHandler * revision push
This commit is contained in:
@@ -191,7 +191,7 @@ if (!CLI)
|
||||
$checkSourceDirs = function($sub) use ($imgPath, &$paths, $modeMask)
|
||||
{
|
||||
$hasMissing = false;
|
||||
foreach ($paths as $idx => list($subDir, $isLocalized, $realPath))
|
||||
foreach ($paths as $idx => [$subDir, $isLocalized, $realPath])
|
||||
{
|
||||
if ($realPath && !$isLocalized)
|
||||
continue;
|
||||
@@ -236,7 +236,7 @@ if (!CLI)
|
||||
$locList[] = $xp;
|
||||
|
||||
CLI::write('required resources overview:', CLI::LOG_INFO);
|
||||
foreach ($paths as list($path, $isLocalized, $realPath))
|
||||
foreach ($paths as [$path, $isLocalized, $realPath])
|
||||
{
|
||||
if (!$realPath)
|
||||
CLI::write(CLI::red('MISSING').' - '.str_pad($path, 14).' @ '.sprintf($imgPath, '['.implode(',', $locList).']/').$path);
|
||||
|
||||
@@ -193,7 +193,7 @@ if (!CLI)
|
||||
$checkSourceDirs = function($sub) use ($imgPath, &$paths)
|
||||
{
|
||||
$hasMissing = false;
|
||||
foreach ($paths as $pathIdx => list($subDir, , , , , $realPath))
|
||||
foreach ($paths as $pathIdx => [$subDir, , , , , $realPath])
|
||||
{
|
||||
if ($realPath)
|
||||
continue;
|
||||
@@ -243,7 +243,7 @@ if (!CLI)
|
||||
$locList[] = $xp;
|
||||
|
||||
CLI::write('required resources overview:', CLI::LOG_INFO);
|
||||
foreach ($paths as list($path, , , , , $realPath))
|
||||
foreach ($paths as [$path, , , , , $realPath])
|
||||
{
|
||||
if ($realPath)
|
||||
CLI::write(CLI::green(' FOUND ').' - '.str_pad($path, 53).' @ '.$realPath);
|
||||
@@ -310,7 +310,7 @@ if (!CLI)
|
||||
$dbcEntries = array_intersect_key($dbcEntries, array_unique($dbcEntries));
|
||||
|
||||
$allPaths = [];
|
||||
foreach ($paths as $i => list($inPath, $outInfo, $pattern, $isIcon, $tileSize, $path))
|
||||
foreach ($paths as $i => [$inPath, $outInfo, $pattern, $isIcon, $tileSize, $path])
|
||||
{
|
||||
$search = $path.$pattern;
|
||||
if ($pattern)
|
||||
@@ -346,7 +346,7 @@ if (!CLI)
|
||||
|
||||
$nFiles = count($outInfo) * ($tileSize ? array_sum(array_map('count', $cuNames[$i])) : count($files));
|
||||
|
||||
foreach ($outInfo as list($dest, $ext, $srcSize, $destSize, $borderOffset))
|
||||
foreach ($outInfo as [$dest, $ext, $srcSize, $destSize, $borderOffset])
|
||||
{
|
||||
if ($tileSize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user