Skip to content

Commit

Permalink
fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Dec 8, 2023
1 parent d1b748e commit ed1edfb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/Composer/PackagesListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Yiisoft\Config\Composer;

use Composer\Composer;
use Composer\Package\BasePackage;
use Composer\Package\CompletePackage;
use Composer\Package\PackageInterface;

Expand All @@ -24,7 +25,7 @@ public function __construct(
/**
* Builds and returns packages.
*
* @return array<string, CompletePackage>
* @return array<string, BasePackage>
*/
public function build(): array
{
Expand Down Expand Up @@ -68,7 +69,7 @@ private function getSortedPackageNames(array $packageDepths): array
}

/**
* @param array<string, CompletePackage> $allPackages
* @param array<string, BasePackage> $allPackages
* @param array<string, int> $packageDepths
*/
private function calculatePackageDepths(
Expand Down Expand Up @@ -105,7 +106,7 @@ private function calculatePackageDepths(
}

/**
* @return array<string, CompletePackage>
* @return array<string, BasePackage>
*/
private function getAllPackages(): array
{
Expand Down
9 changes: 5 additions & 4 deletions src/Composer/ProcessHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Composer\Composer;
use Composer\Factory;
use Composer\Package\BasePackage;
use Composer\Package\CompletePackage;
use Composer\Package\PackageInterface;
use Yiisoft\Config\ConfigPaths;
Expand All @@ -28,7 +29,7 @@ final class ProcessHelper
private array $rootPackageExtra;

/**
* @psalm-var array<string, CompletePackage>
* @psalm-var array<string, BasePackage>
*/
private array $packages;

Expand Down Expand Up @@ -65,7 +66,7 @@ public function __construct(Composer $composer)
/**
* Returns all vendor packages.
*
* @psalm-return array<string, CompletePackage>
* @psalm-return array<string, BasePackage>
*/
public function getPackages(): array
{
Expand All @@ -75,7 +76,7 @@ public function getPackages(): array
/**
* Returns vendor packages without packages from the vendor override sublayer.
*
* @psalm-return array<string, CompletePackage>
* @psalm-return array<string, BasePackage>
*/
public function getVendorPackages(): array
{
Expand All @@ -93,7 +94,7 @@ public function getVendorPackages(): array
/**
* Returns vendor packages only from the vendor override sublayer.
*
* @psalm-return array<string, CompletePackage>
* @psalm-return array<string, BasePackage>
*/
public function getVendorOverridePackages(): array
{
Expand Down

0 comments on commit ed1edfb

Please sign in to comment.