Skip to content

Commit 72cdee8

Browse files
[Bridge/PhpUnit] fix parse error on PHP5
1 parent cf3b39d commit 72cdee8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

DeprecationErrorHandler/Deprecation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function getType()
206206
return self::TYPE_DIRECT;
207207
}
208208

209-
private function getOriginalFilesStack(): array
209+
private function getOriginalFilesStack()
210210
{
211211
if (null === $this->originalFilesStack) {
212212
$this->originalFilesStack = [];

Tests/DeprecationErrorHandler/DeprecationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DeprecationTest extends TestCase
2121
{
2222
private static $vendorDir;
2323

24-
private static function getVendorDir(): string
24+
private static function getVendorDir()
2525
{
2626
if (null !== self::$vendorDir) {
2727
return self::$vendorDir;
@@ -148,7 +148,7 @@ public function testItTakesMutesDeprecationFromPhpUnitFiles()
148148
$this->assertTrue($deprecation->isMuted());
149149
}
150150

151-
public function providerGetTypeDetectsSelf(): array
151+
public function providerGetTypeDetectsSelf()
152152
{
153153
foreach (get_declared_classes() as $class) {
154154
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
@@ -187,7 +187,7 @@ public function providerGetTypeDetectsSelf(): array
187187
/**
188188
* @dataProvider providerGetTypeDetectsSelf
189189
*/
190-
public function testGetTypeDetectsSelf(string $expectedType, string $message, string $traceClass, string $file): void
190+
public function testGetTypeDetectsSelf(string $expectedType, string $message, string $traceClass, string $file)
191191
{
192192
$trace = [
193193
['class' => 'MyClass1', 'function' => 'myMethod'],
@@ -197,7 +197,7 @@ public function testGetTypeDetectsSelf(string $expectedType, string $message, st
197197
$this->assertSame($expectedType, $deprecation->getType());
198198
}
199199

200-
public function providerGetTypeUsesRightTrace(): array
200+
public function providerGetTypeUsesRightTrace()
201201
{
202202
$vendorDir = self::getVendorDir();
203203

@@ -243,7 +243,7 @@ public function providerGetTypeUsesRightTrace(): array
243243
/**
244244
* @dataProvider providerGetTypeUsesRightTrace
245245
*/
246-
public function testGetTypeUsesRightTrace(string $expectedType, string $message, array $trace): void
246+
public function testGetTypeUsesRightTrace(string $expectedType, string $message, array $trace)
247247
{
248248
$deprecation = new Deprecation(
249249
$message,
@@ -257,12 +257,12 @@ public function testGetTypeUsesRightTrace(string $expectedType, string $message,
257257
* This method is here to simulate the extra level from the piece of code
258258
* triggering an error to the error handler.
259259
*/
260-
public function debugBacktrace(): array
260+
public function debugBacktrace()
261261
{
262262
return debug_backtrace();
263263
}
264264

265-
private static function removeDir($dir): void
265+
private static function removeDir($dir)
266266
{
267267
$files = glob($dir.'/*');
268268
foreach ($files as $file) {
@@ -275,7 +275,7 @@ private static function removeDir($dir): void
275275
rmdir($dir);
276276
}
277277

278-
public static function tearDownAfterClass(): void
278+
public static function tearDownAfterClass()
279279
{
280280
self::removeDir(self::getVendorDir().'/myfakevendor');
281281
}

0 commit comments

Comments
 (0)