You are here

public function ExampleService::test3 in Coder 8.3

Same name and namespace in other branches
  1. 8.2 coder_sniffer/DrupalPractice/Test/Objects/src/ExampleService.php \Drupal\testmodule\ExampleService::test3()
  2. 8.3.x tests/DrupalPractice/Objects/drupal8/ExampleService.php \Drupal\testmodule\ExampleService::test3()

Global function should not be used, we should use an injected service.

File

tests/DrupalPractice/Objects/drupal8/ExampleService.php, line 29

Class

ExampleService
Some service.

Namespace

Drupal\testmodule

Code

public function test3() {
  return format_date(time());
}