Shorten multi-return helper namespace

pull/20/head
韩天峰 2 months ago
parent 4caed34458
commit 5f735e2fc0
  1. 6
      phpunit/src/MultiReturnTest.php
  2. 2
      src/CompilerBase.php

@ -17,11 +17,11 @@ final class MultiReturnTest extends TestCase
$code = file_get_contents($cppFile); $code = file_get_contents($cppFile);
$this->assertStringContainsString( $this->assertStringContainsString(
'std::tuple<php::Var, php::Var> typephp::detail::multi_return::php_phpunit_multi_values()', 'std::tuple<php::Var, php::Var> typephp::detail::php_phpunit_multi_values()',
$code, $code,
); );
$this->assertStringContainsString( $this->assertStringContainsString(
'std::tie(first, second) = typephp::detail::multi_return::php_phpunit_multi_values()', 'std::tie(first, second) = typephp::detail::php_phpunit_multi_values()',
$code, $code,
); );
$this->assertStringContainsString( $this->assertStringContainsString(
@ -33,7 +33,7 @@ final class MultiReturnTest extends TestCase
$code, $code,
); );
$this->assertStringNotContainsString( $this->assertStringNotContainsString(
'typephp::detail::multi_return::php_phpunit_multi_side_effect', 'typephp::detail::php_phpunit_multi_side_effect',
$code, $code,
); );
} }

@ -197,7 +197,7 @@ class CompilerBase implements PropertyAccessContext
public const string NAMESPACE_SEPARATOR = '__'; public const string NAMESPACE_SEPARATOR = '__';
public const string PREFIX = 'php_'; public const string PREFIX = 'php_';
protected const string MULTI_RETURN_NAMESPACE = 'typephp::detail::multi_return'; protected const string MULTI_RETURN_NAMESPACE = 'typephp::detail';
public const string OP_ISSET = 'isset'; public const string OP_ISSET = 'isset';
public const string OP_EMPTY = 'empty'; public const string OP_EMPTY = 'empty';
public const string OP_NOT_EMPTY = 'notEmpty'; public const string OP_NOT_EMPTY = 'notEmpty';

Loading…
Cancel
Save