Skip to content

Commit 5b22e46

Browse files
committed
Last few array() to []
1 parent fd3bc8c commit 5b22e46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ExtraPackage.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,12 +653,12 @@ public static function unwrapIfNeeded(
653653

654654
protected function mergeAliases(RootPackageInterface $root)
655655
{
656-
$aliases = array();
656+
$aliases = [];
657657
$unwrapped = self::unwrapIfNeeded($root, 'setAliases');
658658
foreach (array('require', 'require-dev') as $linkType) {
659659
$linkInfo = BasePackage::$supportedLinkTypes[$linkType];
660660
$method = 'get'.ucfirst($linkInfo['method']);
661-
$links = array();
661+
$links = [];
662662
foreach ($unwrapped->$method() as $link) {
663663
$links[$link->getTarget()] = $link->getConstraint()->getPrettyString();
664664
}
@@ -679,12 +679,12 @@ protected function extractAliases(array $requires, array $aliases)
679679
{
680680
foreach ($requires as $reqName => $reqVersion) {
681681
if (preg_match('{^([^,\s#]+)(?:#[^ ]+)? +as +([^,\s]+)$}', $reqVersion, $match)) {
682-
$aliases[] = array(
682+
$aliases[] = [
683683
'package' => strtolower($reqName),
684684
'version' => $this->versionParser->normalize($match[1], $reqVersion),
685685
'alias' => $match[2],
686686
'alias_normalized' => $this->versionParser->normalize($match[2], $reqVersion),
687-
);
687+
];
688688
} elseif (strpos($reqVersion, ' as ') !== false) {
689689
throw new UnexpectedValueException(
690690
'Invalid alias definition in "'.$reqName.'": "'.$reqVersion.'". '

0 commit comments

Comments
 (0)