Skip to content

Commit

Permalink
phpcs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
defunctl committed Aug 31, 2023
1 parent 30755e5 commit a4b0250
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 43 deletions.
34 changes: 17 additions & 17 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public static function offsetSet($offset, $value)
* Binds an interface a class or a string slug to an implementation and will always return the same instance.
*
* @param string|class-string $id A class or interface fully qualified name or a string slug.
* @param mixed $implementation The implementation that should be bound to the alias(es); can be a
* class name, an object or a closure.
* @param mixed $implementation The implementation that should be bound to the alias(es); can
* be a class name, an object or a closure.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the built
* implementation after resolving it.
*
Expand Down Expand Up @@ -299,8 +299,8 @@ public static function register($serviceProviderClass, ...$alias)
* Existing implementations are replaced.
*
* @param string|class-string $id A class or interface fully qualified name or a string slug.
* @param mixed $implementation The implementation that should be bound to the alias(es); can be a
* class name, an object or a closure.
* @param mixed $implementation The implementation that should be bound to the alias(es); can
* be a class name, an object or a closure.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the built
* implementation after resolving it.
*
Expand Down Expand Up @@ -333,12 +333,12 @@ public static function boot()
* object; the chain will be lazily resolved only on the first call.
* The base decorated object must be the last element of the array.
*
* @param string|class-string $id The class, interface or slug the decorator chain should
* be bound to.
* @param string|class-string $id The class, interface or slug the decorator chain
* should be bound to.
* @param array<string|object|callable> $decorators An array of implementations that decorate an object.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the
* instance after it has been built; the methods should not
* require any argument.
* instance after it has been built; the methods should
* not require any argument.
*
* @return void This method does not return any value.
* @throws ContainerException
Expand All @@ -354,12 +354,12 @@ public static function singletonDecorators($id, $decorators, array $afterBuildMe
*
* The base decorated object must be the last element of the array.
*
* @param string|class-string $id The class, interface or slug the decorator chain should
* be bound to.
* @param string|class-string $id The class, interface or slug the decorator chain
* should be bound to.
* @param array<string|object|callable> $decorators An array of implementations that decorate an object.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the
* instance after it has been built; the methods should not
* require any argument.
* instance after it has been built; the methods should
* not require any argument.
*
* @return void This method does not return any value.
* @throws ContainerException If there's any issue binding the decorators.
Expand Down Expand Up @@ -451,8 +451,8 @@ public static function give($implementation)
*
* @param string|class-string|object $id A fully-qualified class name, a bound slug or an object o call the
* callback on.
* @param string $method The method that should be called on the resolved implementation with the
* specified array arguments.
* @param string $method The method that should be called on the resolved implementation
* with the specified array arguments.
*
* @return callable|Closure The callback function.
* @throws ContainerException If the id is not a bound implementation or valid class name.
Expand All @@ -468,9 +468,9 @@ public static function callback($id, $method)
* The callable will be a closure on PHP 5.3+ or a lambda function on PHP 5.2.
*
* @param string|class-string|mixed $id The fully qualified name of a class or an interface.
* @param array<mixed> $buildArgs An array of arguments that should be used to build the instance;
* note that any argument will be resolved using the container itself
* and bindings will apply.
* @param array<mixed> $buildArgs An array of arguments that should be used to build the
* instance; note that any argument will be resolved using
* the container itself and bindings will apply.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the built
* implementation after resolving it.
*
Expand Down
4 changes: 2 additions & 2 deletions src/Builders/ClassBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class ClassBuilder implements BuilderInterface, ReinitializableBuilderInterface
* @param Resolver $resolver A reference to the resolver currently using the builder.
* @param string $className The fully-qualified class name to build instances for.
* @param string[]|null $afterBuildMethods An optional set of methods to call on the built object.
* @param mixed ...$buildArgs An optional set of build arguments that should be provided to the
* class constructor method.
* @param mixed ...$buildArgs An optional set of build arguments that should be provided to
* the class constructor method.
*
* @throws NotFoundException If the class does not exist.
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Builders/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ public function __construct(Container $container, Resolver $resolver)
*
* @param string|class-string|mixed $id The string id to provide a builder for, or a value.
* @param mixed $implementation The implementation to build the builder for.
* @param string[]|null $afterBuildMethods A list of methods that should be called on the built instance
* after
* it's been built.
* @param mixed ...$buildArgs A set of arguments to pass that should be used to build the
* instance, if any.
* @param string[]|null $afterBuildMethods A list of methods that should be called on the built
* instance after it's been built.
* @param mixed ...$buildArgs A set of arguments to pass that should be used to build
* the instance, if any.
*
* @return BuilderInterface A builder instance.
*
Expand Down
8 changes: 4 additions & 4 deletions src/Builders/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ public function resolveWithArgs($id, array $afterBuildMethods = null, ...$buildA
*
* @template T
*
* @param string|class-string<T>|mixed $id Either the id of a bound implementation, a class name or an object
* to resolve.
* @param string[]|null $buildLine The build line to append the resolution leafs to, or `null` to use the
* current one.
* @param string|class-string<T>|mixed $id Either the id of a bound implementation, a class name or an
* object to resolve.
* @param string[]|null $buildLine The build line to append the resolution leafs to, or `null` to
* use the current one.
*
* @return T|mixed The resolved value or instance.
*
Expand Down
30 changes: 15 additions & 15 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ private function getDeferredProviderMakeClosure(ServiceProvider $provider, $id)
* Existing implementations are replaced.
*
* @param string|class-string $id A class or interface fully qualified name or a string slug.
* @param mixed $implementation The implementation that should be bound to the alias(es); can be a
* class name, an object or a closure.
* @param mixed $implementation The implementation that should be bound to the alias(es); can
* be a class name, an object or a closure.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the built
* implementation after resolving it.
*
Expand Down Expand Up @@ -559,12 +559,12 @@ public function boot()
* object; the chain will be lazily resolved only on the first call.
* The base decorated object must be the last element of the array.
*
* @param string|class-string $id The class, interface or slug the decorator chain should
* be bound to.
* @param string|class-string $id The class, interface or slug the decorator chain
* should be bound to.
* @param array<string|object|callable> $decorators An array of implementations that decorate an object.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the
* instance after it has been built; the methods should not
* require any argument.
* instance after it has been built; the methods should
* not require any argument.
*
* @return void This method does not return any value.
* @throws ContainerException
Expand Down Expand Up @@ -609,12 +609,12 @@ private function getDecoratorBuilder(array $decorators, $id, array $afterBuildMe
*
* The base decorated object must be the last element of the array.
*
* @param string|class-string $id The class, interface or slug the decorator chain should
* be bound to.
* @param string|class-string $id The class, interface or slug the decorator chain
* should be bound to.
* @param array<string|object|callable> $decorators An array of implementations that decorate an object.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the
* instance after it has been built; the methods should not
* require any argument.
* instance after it has been built; the methods should
* not require any argument.
*
* @return void This method does not return any value.
* @throws ContainerException If there's any issue binding the decorators.
Expand Down Expand Up @@ -718,8 +718,8 @@ public function give($implementation)
*
* @param string|class-string|object $id A fully-qualified class name, a bound slug or an object o call the
* callback on.
* @param string $method The method that should be called on the resolved implementation with the
* specified array arguments.
* @param string $method The method that should be called on the resolved implementation
* with the specified array arguments.
*
* @return callable|Closure The callback function.
* @throws ContainerException If the id is not a bound implementation or valid class name.
Expand Down Expand Up @@ -789,9 +789,9 @@ protected function isStaticMethod($object, $method)
* The callable will be a closure on PHP 5.3+ or a lambda function on PHP 5.2.
*
* @param string|class-string|mixed $id The fully qualified name of a class or an interface.
* @param array<mixed> $buildArgs An array of arguments that should be used to build the instance;
* note that any argument will be resolved using the container itself
* and bindings will apply.
* @param array<mixed> $buildArgs An array of arguments that should be used to build the
* instance; note that any argument will be resolved using
* the container itself and bindings will apply.
* @param string[]|null $afterBuildMethods An array of methods that should be called on the built
* implementation after resolving it.
*
Expand Down

0 comments on commit a4b0250

Please sign in to comment.