Skip to content

Commit

Permalink
Merge pull request #64 from laminas/renovate/vimeo-psalm-5.x
Browse files Browse the repository at this point in the history
Update dependency vimeo/psalm to v5
  • Loading branch information
Ocramius committed Dec 5, 2022
2 parents 4c05537 + c929205 commit 24d4da5
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 93 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"mikey179/vfsstream": "^1.6.11",
"phpunit/phpunit": "^9.5.26",
"psalm/plugin-phpunit": "^0.18.0",
"vimeo/psalm": "^4.29.0",
"vimeo/psalm": "^5.0.0",
"webmozart/assert": "^1.11.0"
},
"autoload": {
Expand Down
113 changes: 29 additions & 84 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
*
* @template TKey of array-key
* @template TValue
*
* @implements IteratorAggregate<TKey, TValue>
*/
final class Collection implements
Countable,
Expand Down
7 changes: 4 additions & 3 deletions src/ComponentInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ private function marshalPackageComponents(array $extra, Collection $packageTypes
*
* @param ComposerExtraComponentInstallerArrayType $extra
* @param Collection<int,ConfigOption> $options
* @return Collection<array-key,non-empty-string> List of packages to install
* @return Collection<int,non-empty-string> List of packages to install
*/
private function marshalInstallableComponents(array $extra, Collection $options): Collection
{
Expand Down Expand Up @@ -658,9 +658,10 @@ private function removePackageFromConfig(string $package, array $metadata): void
/**
* Remove an individual module defined in a package from configuration.
*
* @param non-empty-string $component Module to remove
* @template TKey of array-key
* @param non-empty-string $component Module to remove
* @param non-empty-string $package Package in which module is defined
* @param Collection<array-key,InjectorInterface> $injectors Injectors to use for removal
* @param Collection<TKey,InjectorInterface> $injectors Injectors to use for removal
*/
private function removeModuleFromConfig(string $component, string $package, Collection $injectors): void
{
Expand Down
3 changes: 2 additions & 1 deletion src/ConfigDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ final class ConfigDiscovery
/**
* Return a list of available configuration options.
*
* @param Collection<array-key,InjectorInterface::TYPE_*> $availableTypes Collection of injector type
* @template TKey of array-key
* @param Collection<TKey,InjectorInterface::TYPE_*> $availableTypes Collection of injector type
* constants indicating valid package types that could be injected.
* @param string $projectRoot Path to the project root; assumes PWD by default.
* @return Collection<int,ConfigOption> Collection of ConfigOption instances.
Expand Down
4 changes: 2 additions & 2 deletions src/ConfigDiscovery/DiscoveryChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class DiscoveryChain implements DiscoveryChainInterface
/**
* Discovery Collection
*
* @var Collection<array-key,DiscoveryInterface>
* @var Collection<string,DiscoveryInterface>
*/
protected Collection $chain;

Expand All @@ -27,7 +27,7 @@ final class DiscoveryChain implements DiscoveryChainInterface
public function __construct(array $discovery, string $projectDirectory = '')
{
$this->chain = (new Collection($discovery))
// Create a discovery class for the dicovery type
// Create a discovery class for the discovery type
->map(static fn(string $discoveryClass) => new $discoveryClass($projectDirectory))
// Use only those where we can locate a corresponding config file
->filter(static fn(DiscoveryInterface $discovery) => $discovery->locate());
Expand Down
4 changes: 2 additions & 2 deletions src/Injector/ConfigInjectorChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class ConfigInjectorChain implements InjectorInterface
/**
* ConfigInjectors Collection
*
* @var Collection<array-key,InjectorInterface>
* @var Collection<string,InjectorInterface>
*/
private Collection $chain;

Expand Down Expand Up @@ -135,7 +135,7 @@ public function remove(string $package): bool
}

/**
* @return Collection<array-key,InjectorInterface>
* @return Collection<string,InjectorInterface>
*/
public function getCollection(): Collection
{
Expand Down

0 comments on commit 24d4da5

Please sign in to comment.