From 11ac27d0b22a99cde8d91299093e1915bac98ad0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 10 Mar 2019 11:16:46 +0100 Subject: [PATCH] fix merge --- .../FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php | 2 +- .../Component/Form/Test/TestCaseSetUpTearDownTrait.php | 6 +----- .../Component/Validator/Test/TestCaseSetUpTearDownTrait.php | 6 +----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php index 217c2ae457..bc23a39cfa 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase; // Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method -if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) { +if ((new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) { /** * @internal */ diff --git a/src/Symfony/Component/Form/Test/TestCaseSetUpTearDownTrait.php b/src/Symfony/Component/Form/Test/TestCaseSetUpTearDownTrait.php index b44d8212df..30d41059b2 100644 --- a/src/Symfony/Component/Form/Test/TestCaseSetUpTearDownTrait.php +++ b/src/Symfony/Component/Form/Test/TestCaseSetUpTearDownTrait.php @@ -15,10 +15,7 @@ use PHPUnit\Framework\TestCase; // Auto-adapt to PHPUnit 8 that added a `void` return-type to the setUp/tearDown methods -if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) { - eval(' - namespace Symfony\Component\Form\Test; - +if ((new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) { /** * @internal */ @@ -42,7 +39,6 @@ if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \Reflection $this->doTearDown(); } } -'); } else { /** * @internal diff --git a/src/Symfony/Component/Validator/Test/TestCaseSetUpTearDownTrait.php b/src/Symfony/Component/Validator/Test/TestCaseSetUpTearDownTrait.php index 236e02267b..be05bbb33f 100644 --- a/src/Symfony/Component/Validator/Test/TestCaseSetUpTearDownTrait.php +++ b/src/Symfony/Component/Validator/Test/TestCaseSetUpTearDownTrait.php @@ -15,10 +15,7 @@ use PHPUnit\Framework\TestCase; // Auto-adapt to PHPUnit 8 that added a `void` return-type to the setUp/tearDown methods -if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) { - eval(' - namespace Symfony\Component\Validator\Test; - +if ((new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) { /** * @internal */ @@ -42,7 +39,6 @@ if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \Reflection $this->doTearDown(); } } -'); } else { /** * @internal