diff --git a/src/SPC/util/GlobalEnvManager.php b/src/SPC/util/GlobalEnvManager.php index 70893b94..9a30f8d0 100644 --- a/src/SPC/util/GlobalEnvManager.php +++ b/src/SPC/util/GlobalEnvManager.php @@ -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 { diff --git a/tests/SPC/builder/BuilderTest.php b/tests/SPC/builder/BuilderTest.php index 3dbdc845..fe46b785 100644 --- a/tests/SPC/builder/BuilderTest.php +++ b/tests/SPC/builder/BuilderTest.php @@ -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 {