cs-fix and fix tests

This commit is contained in:
crazywhalecc 2024-10-05 12:04:14 +08:00 committed by Jerry Ma
parent 58095a61c8
commit 3c802119ed
2 changed files with 3 additions and 2 deletions

View File

@ -24,8 +24,9 @@ class GlobalEnvManager
/**
* Initialize the environment variables
*
* @param BuilderBase $builder Builder
* @param null|BuilderBase $builder Builder
* @throws RuntimeException
* @throws WrongUsageException
*/
public static function init(?BuilderBase $builder = null): void
{

View File

@ -102,7 +102,7 @@ class BuilderTest extends TestCase
{
if (file_exists(SOURCE_PATH . '/php-src/main/php_version.h')) {
$file = SOURCE_PATH . '/php-src/main/php_version.h';
$cnt = preg_match('/PHP_VERSION "(\d+\.\d+\.\d+)"/', $file, $match);
$cnt = preg_match('/PHP_VERSION "(\d+\.\d+\.\d+)"/', file_get_contents($file), $match);
if ($cnt !== 0) {
$this->assertEquals($match[1], $this->builder->getPHPVersion());
} else {