@@ -26,9 +26,9 @@ class ServiceDescriptor
2626
2727 private int $ lifetime ;
2828 private string $ serviceType ;
29- private ?string $ implimentationType = null ;
29+ private ?string $ implementationType = null ;
3030 private ?object $ implementationInstance = null ;
31- private ?Closure $ implimentationFactory = null ;
31+ private ?Closure $ implementationFactory = null ;
3232
3333 public function __construct (int $ lifetime , string $ serviceType , $ service = null )
3434 {
@@ -50,7 +50,7 @@ public function __construct(int $lifetime, string $serviceType, $service = null)
5050 if (!$ serviceType ->isAssignableFrom (new Type ($ service ))) {
5151 throw new TypeException ("The registered service is not compatible with the declared type {$ serviceType }" , 0 , 1 );
5252 }
53- $ this ->implimentationType = $ service ;
53+ $ this ->implementationType = $ service ;
5454 break ;
5555 case is_object ($ service ):
5656 if ($ service instanceof Closure) {
@@ -59,14 +59,14 @@ public function __construct(int $lifetime, string $serviceType, $service = null)
5959 throw new TypeException ("The service factory must have a return type " , 0 , 1 );
6060 }
6161
62- // The registered service must be assignable to the factory returne type and to the declared service type
63- // and the declared service type must be assignable to and from the factory returne type
64- // becasue both can be concrete or abstract type of the registed service.
62+ // The registered service must be assignable to the factory retune type and to the declared service type
63+ // and the declared service type must be assignable to and from the factory return type
64+ // because both can be concrete or abstract type of the registered service.
6565 $ type = new Type ($ reflector ->getReturnType ()->getName ());
6666 if (!$ serviceType ->isAssignableFrom ($ type ) && !$ serviceType ->isAssignableTo ($ type )) {
6767 throw new TypeException ("The registered service is not compatible with the declared type {$ serviceType }" , 0 , 1 );
6868 }
69- $ this ->implimentationFactory = $ service ;
69+ $ this ->implementationFactory = $ service ;
7070 } else {
7171 // The registered service must be assignable to the declared service type
7272 if (!$ serviceType ->isTypeOf ($ service )) {
@@ -91,18 +91,18 @@ public function get_ServiceType(): string
9191 return $ this ->serviceType ;
9292 }
9393
94- public function get_ImplimentationType (): ?string
94+ public function get_ImplementationType (): ?string
9595 {
96- return $ this ->implimentationType ;
96+ return $ this ->implementationType ;
9797 }
9898
9999 public function get_ImplementationInstance (): ?object
100100 {
101101 return $ this ->implementationInstance ;
102102 }
103103
104- public function get_ImplimentationFactory (): ?Closure
104+ public function get_ImplementationFactory (): ?Closure
105105 {
106- return $ this ->implimentationFactory ;
106+ return $ this ->implementationFactory ;
107107 }
108108}
0 commit comments