diff --git a/src/Composer/Command/CheckPlatformReqsCommand.php b/src/Composer/Command/CheckPlatformReqsCommand.php index dc24e0634..c03ed0804 100644 --- a/src/Composer/Command/CheckPlatformReqsCommand.php +++ b/src/Composer/Command/CheckPlatformReqsCommand.php @@ -62,24 +62,24 @@ EOT // 检查版本 $version = $currentPlatformPackageMap[$key]->getVersion(); if (!$require->getConstraint()->matches(new Constraint('<=', $version))) { - $results[] = [ + $results[] = array( $require, $currentPlatformPackageMap[$key], 'failed', - ]; + ); } else { - $results[] = [ + $results[] = array( $require, $currentPlatformPackageMap[$key], 'success', - ]; + ); } } else { - $results[] = [ + $results[] = array( $require, null, 'miss', - ]; + ); } } } @@ -99,7 +99,13 @@ EOT */ list($require, $platformPackage, $reason) = $result; $version = (strpos($platformPackage->getPrettyVersion(), 'No version set') === 0) ? '-' : $platformPackage->getPrettyVersion(); - $rows[] = [$platformPackage->getPrettyName(), $version, $require->getDescription(), sprintf('%s (%s)', $require->getTarget(), $require->getPrettyConstraint()), $reason]; + $rows[] = array( + $platformPackage->getPrettyName(), + $version, + $require->getDescription(), + sprintf('%s (%s)', $require->getTarget(), $require->getPrettyConstraint()), + $reason + ); } $table = array_merge($rows, $table);