public function ExampleClassWithDependencyInjection::test in Coder 8.3
Same name and namespace in other branches
- 8.3.x tests/DrupalPractice/Objects/drupal8/ExampleClassWithDependencyInjection.php \Drupal\testmodule\ExampleClassWithDependencyInjection::test()
Using \Drupal here is not allowed, it should be injected instead.
File
- tests/
DrupalPractice/ Objects/ drupal8/ ExampleClassWithDependencyInjection.php, line 16
Class
- ExampleClassWithDependencyInjection
- A class which is not a service but has access to the container.
Namespace
Drupal\testmoduleCode
public function test() {
return \Drupal::configFactory();
}