Skip to content

Commit 7227bec

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: add missing return type declaration Modernize func_get_args() calls to variadic parameters Use a lazyintertor to close files descriptors when no longer used
2 parents 930f176 + a6012f3 commit 7227bec

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Tests/Locale/AbstractLocaleTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@ public function testSetDefault()
2727
$this->assertSame('en_GB', $this->call('getDefault'));
2828
}
2929

30-
abstract protected function call($methodName);
30+
/**
31+
* @param mixed ...$args
32+
*
33+
* @return mixed
34+
*/
35+
abstract protected function call(string $methodName, ...$args);
3136
}

Tests/Locale/LocaleTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,8 @@ public function testSetDefaultAcceptsEn()
139139
$this->assertSame('en', $this->call('getDefault'));
140140
}
141141

142-
protected function call($methodName)
142+
protected function call(string $methodName, ...$args)
143143
{
144-
$args = \array_slice(\func_get_args(), 1);
145-
146144
return Locale::{$methodName}(...$args);
147145
}
148146
}

Tests/Locale/Verification/LocaleTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ protected function setUp(): void
2929
parent::setUp();
3030
}
3131

32-
protected function call($methodName)
32+
protected function call(string $methodName, ...$args)
3333
{
34-
$args = \array_slice(\func_get_args(), 1);
35-
3634
return \Locale::{$methodName}(...$args);
3735
}
3836
}

0 commit comments

Comments
 (0)