1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Fixed code style issues.

This commit is contained in:
kolja 2020-02-24 21:55:07 +01:00 committed by Matthew Brown
parent 326d1cb025
commit 99e5ded20c
2 changed files with 6 additions and 6 deletions

View File

@ -3,6 +3,8 @@ namespace Psalm;
use Webmozart\PathUtil\Path;
use function preg_match;
use function ini_get;
use function strtoupper;
/**
* @param string $path
@ -26,18 +28,15 @@ function getMemoryLimitInBytes(): int
if (preg_match('/^(\d+)(\D?)$/', $limit, $matches)) {
$limit = (int)$matches[1];
switch (strtoupper($matches[2] ?? '')) {
case 'G': {
case 'G':
$limit *= 1024 * 1024 * 1024;
break;
}
case 'M': {
case 'M':
$limit *= 1024 * 1024;
break;
}
case 'K': {
case 'K':
$limit *= 1024;
break;
}
}
}

View File

@ -2,6 +2,7 @@
namespace Psalm\Tests\Functions;
use function Psalm\getMemoryLimitInBytes;
use function ini_set;
class GetMemoryLimitInBytesTest extends \Psalm\Tests\TestCase
{