diff --git a/src/Core/Hooks/Capabilities/ICanManageInstances.php b/src/Core/Hooks/Capabilities/ICanManageInstances.php index 08802a08e6..d6a7f244c7 100644 --- a/src/Core/Hooks/Capabilities/ICanManageInstances.php +++ b/src/Core/Hooks/Capabilities/ICanManageInstances.php @@ -35,8 +35,8 @@ interface ICanManageInstances * @see https://refactoring.guru/design-patterns/strategy * * @param string $interface The interface, which the given class implements - * @param string $name The name of the given class, which will be used for factories, dependency injections etc. - * @param string $class The class of the given class + * @param string $name An arbitrary identifier for the given class, which will be used for factories, dependency injections etc. + * @param string $class The fully-qualified given class name * @param ?array $arguments Additional arguments, which can be passed to the constructor * * @return $this This interface for chain-calls @@ -51,8 +51,8 @@ interface ICanManageInstances * * @note Decorator attach new behaviors to classes without changing them or without letting them know about it. * - * @param string $class The class or interface, which gets decorated by a class - * @param string $decoratorClass The class, which mimics the given class or interface and adds new functionality + * @param string $class The fully-qualified class or interface name, which gets decorated by a class + * @param string $decoratorClass The fully-qualified name of the class which mimics the given class or interface and adds new functionality * @param array $arguments Additional arguments, which can be passed to the constructor of "decoratorClass" * * @return $this This interface for chain-calls @@ -69,7 +69,7 @@ interface ICanManageInstances * In case, there are registered decorators for this class as well, all decorators of the list will be wrapped * around the instance before returning it * - * @param string $class A given class or interface, which will get returned + * @param string $class The fully-qualified name of the given class or interface which will get returned * @param string $name The name of the concrete class, wich * @param array $arguments Additional arguments, which can be passed to the constructor of "$class" at runtime * diff --git a/src/Core/Hooks/Model/InstanceManager.php b/src/Core/Hooks/Model/InstanceManager.php index 7a3697062d..7bfcfa420d 100644 --- a/src/Core/Hooks/Model/InstanceManager.php +++ b/src/Core/Hooks/Model/InstanceManager.php @@ -67,7 +67,7 @@ class InstanceManager implements ICanManageInstances public function registerDecorator(string $class, string $decoratorClass, array $arguments = []): ICanManageInstances { if (!is_a($decoratorClass, $class, true)) { - throw new HookRegisterArgumentException(sprintf('%s is not a valid subsituation for the given class or interface %s', $decoratorClass, $class)); + throw new HookRegisterArgumentException(sprintf('%s is not a valid substitution for the given class or interface %s', $decoratorClass, $class)); } $this->decorator[$class][] = [