[Components][Dependency Injection] fix PHP syntax errors
Merge pull request #3400 from xabbuh/service-factory

[Components][Dependency Injection] fix PHP syntax errors