Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7a132fe

Browse filesBrowse files
committed
remove no longer needed PHP version checks
1 parent 4973a5e commit 7a132fe
Copy full SHA for 7a132fe

File tree

Expand file treeCollapse file tree

2 files changed

+6
-16
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-16
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php
+2-7Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,21 +155,16 @@ public static function getEventDispatchers()
155155

156156
public static function getCallables()
157157
{
158-
$callables = array(
158+
return array(
159159
'callable_1' => 'array_key_exists',
160160
'callable_2' => array('Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass', 'staticMethod'),
161161
'callable_3' => array(new CallableClass(), 'method'),
162162
'callable_4' => 'Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass::staticMethod',
163163
'callable_5' => array('Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\ExtendedCallableClass', 'parent::staticMethod'),
164164
'callable_6' => function () { return 'Closure'; },
165165
'callable_7' => new CallableClass(),
166+
'callable_from_callable' => \Closure::fromCallable(new CallableClass()),
166167
);
167-
168-
if (\PHP_VERSION_ID >= 70100) {
169-
$callables['callable_from_callable'] = \Closure::fromCallable(new CallableClass());
170-
}
171-
172-
return $callables;
173168
}
174169
}
175170

‎src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/EventDispatcher/Tests/Debug/WrappedListenerTest.php
+4-9Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,16 @@ public function testListenerDescription(callable $listener, $expected)
3030

3131
public function provideListenersToDescribe()
3232
{
33-
$listeners = array(
33+
return array(
3434
array(new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'),
3535
array(array(new FooListener(), 'listen'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'),
3636
array(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'),
3737
array('var_dump', 'var_dump'),
3838
array(function () {}, 'closure'),
39+
array(\Closure::fromCallable(array(new FooListener(), 'listen')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'),
40+
array(\Closure::fromCallable(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'),
41+
array(\Closure::fromCallable(function () {}), 'closure'),
3942
);
40-
41-
if (\PHP_VERSION_ID >= 70100) {
42-
$listeners[] = array(\Closure::fromCallable(array(new FooListener(), 'listen')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen');
43-
$listeners[] = array(\Closure::fromCallable(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic');
44-
$listeners[] = array(\Closure::fromCallable(function () {}), 'closure');
45-
}
46-
47-
return $listeners;
4843
}
4944
}
5045

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.