diff --git a/src/Collection.php b/src/Collection.php index f971814..7ae3b04 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -27,6 +27,8 @@ * * @template TKey of array-key * @template TValue + * + * @implements IteratorAggregate */ final class Collection implements Countable, diff --git a/src/ComponentInstaller.php b/src/ComponentInstaller.php index 7ae57a4..bf22f72 100644 --- a/src/ComponentInstaller.php +++ b/src/ComponentInstaller.php @@ -478,7 +478,7 @@ private function marshalPackageComponents(array $extra, Collection $packageTypes * * @param ComposerExtraComponentInstallerArrayType $extra * @param Collection $options - * @return Collection List of packages to install + * @return Collection List of packages to install */ private function marshalInstallableComponents(array $extra, Collection $options): Collection { @@ -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 $injectors Injectors to use for removal + * @param Collection $injectors Injectors to use for removal */ private function removeModuleFromConfig(string $component, string $package, Collection $injectors): void { diff --git a/src/ConfigDiscovery.php b/src/ConfigDiscovery.php index ed01b6e..6a03099 100644 --- a/src/ConfigDiscovery.php +++ b/src/ConfigDiscovery.php @@ -49,7 +49,8 @@ final class ConfigDiscovery /** * Return a list of available configuration options. * - * @param Collection $availableTypes Collection of injector type + * @template TKey of array-key + * @param Collection $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 Collection of ConfigOption instances. diff --git a/src/ConfigDiscovery/DiscoveryChain.php b/src/ConfigDiscovery/DiscoveryChain.php index 82e14ae..4b1084b 100644 --- a/src/ConfigDiscovery/DiscoveryChain.php +++ b/src/ConfigDiscovery/DiscoveryChain.php @@ -14,7 +14,7 @@ final class DiscoveryChain implements DiscoveryChainInterface /** * Discovery Collection * - * @var Collection + * @var Collection */ protected Collection $chain; @@ -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()); diff --git a/src/Injector/ConfigInjectorChain.php b/src/Injector/ConfigInjectorChain.php index 76b10f2..34dcf21 100644 --- a/src/Injector/ConfigInjectorChain.php +++ b/src/Injector/ConfigInjectorChain.php @@ -22,7 +22,7 @@ final class ConfigInjectorChain implements InjectorInterface /** * ConfigInjectors Collection * - * @var Collection + * @var Collection */ private Collection $chain; @@ -135,7 +135,7 @@ public function remove(string $package): bool } /** - * @return Collection + * @return Collection */ public function getCollection(): Collection {