Skip to content

Commit fd85cc3

Browse files
committed
Multi return type fix for php 7 and below
1 parent 8f71bd2 commit fd85cc3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/CheckerCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ protected function processFile($file)
378378
if (
379379
($method['return'] === 'array' && substr($method['docblock']['return'], -2) === '[]')
380380
|| $method['docblock']['return'] === 'mixed'
381+
|| (strpos($method['docblock']['return'], '|') !== false && PHP_MAJOR_VERSION < 8)
381382
) {
382383
// Do nothing because this is fine.
383384
} else {

0 commit comments

Comments
 (0)