Skip to content

Commit

Permalink
Revert incorrect rector changes
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Jun 16, 2024
1 parent 4194a8f commit 18609be
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ public function get(string $id)
* Sets a definition to the container. Definition may be defined multiple ways.
*
* @param string $id ID to set definition for.
* @param mixed $definition Definition to set.
*
* @throws InvalidConfigException
*
* @see DefinitionNormalizer::normalize()
*/
private function addDefinition(string $id, mixed $definition): void
Expand Down Expand Up @@ -286,7 +288,9 @@ private function setDelegates(array $delegates): void
}

/**
* @param mixed $definition Definition to validate.
* @param string|null $id ID of the definition to validate.
*
* @throws InvalidConfigException
*/
private function validateDefinition(mixed $definition, ?string $id = null): void
Expand Down Expand Up @@ -579,7 +583,10 @@ private function addProviders(array $providers): void
/**
* Builds service provider by definition.
*
* @param mixed $provider Class name or instance of provider.
*
* @throws InvalidConfigException If provider argument is not valid.
*
* @return ServiceProviderInterface Instance of service provider.
*/
private function buildProvider(mixed $provider): ServiceProviderInterface
Expand Down
3 changes: 3 additions & 0 deletions src/ExtensibleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ final class ExtensibleService implements DefinitionInterface
*/
private array $extensions = [];

/**
* @param mixed $definition Definition to allow registering extensions for.
*/
public function __construct(
private mixed $definition,
private string $id
Expand Down
2 changes: 2 additions & 0 deletions src/Helpers/DefinitionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
final class DefinitionNormalizer
{
/**
* @param mixed $definition Definition to normalize.
* @param string $id Service ID.
*
* @throws InvalidConfigException If configuration is not valid.
*/
public static function normalize(mixed $definition, string $id): DefinitionInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Helpers/DefinitionParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ final class DefinitionParser
public const IS_PREPARED_ARRAY_DEFINITION_DATA = 'isPreparedArrayDefinitionData';

/**
* @param mixed $definition Definition to parse.
*
* @return array Definition parsed into array of a special structure.
* @psalm-return array{mixed,array}
*/
Expand Down

0 comments on commit 18609be

Please sign in to comment.