<commit_before>{% extends "base/class.php.twig" %}

{% block file_path %}
\Drupal\{{module}}\Controller\{{ class_name }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{module}}\Controller;
{% endblock %}

{% block use_class %}
use Drupal\Core\Controller\ControllerBase;
{% if services is not empty %}
use Symfony\Component\DependencyInjection\ContainerInterface;
{% endif %}
{% endblock %}

{% block class_declaration %}
/**
 * Class {{ class_name }}.
 *
 * @package Drupal\{{ module }}\Controller
 */
class {{ class_name }} extends ControllerBase {% endblock %}
{% block class_construct %}
{% if services is not empty %}
  /**
   * {@inheritdoc}
   */
  public function __construct({{ servicesAsParameters(services)|join(', ') }}) {
{{ serviceClassInitialization(services) }}
  }

{% endif %}
{% endblock %}
{% block class_create %}
{% if services is not empty %}
  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static(
{{ serviceClassInjection(services) }}
    );
  }

{% endif %}
{% endblock %}
{% block class_methods %}
{% for route in routes %}
  /**
   * {{ route.method | capitalize }}.
   *
   * @return string
   *   Return Hello string.
   */
  public function {{route.method}}({{ argumentsFromRoute(route.path)|join(', ') }}) {
{% if argumentsFromRoute(route.path) is not empty %}
    return [
        '#type' => 'markup',
        '#markup' => $this->t("Implement method: {{route.method}} with parameter(s): {{ argumentsFromRoute(route.path)|join(', ') }}")
    ];
{% else %}
    return [
        '#type' => 'markup',
        '#markup' => $this->t('Implement method: {{route.method}}')
    ];
{% endif %}
  }
{% endfor %}
{% endblock %}<commit_msg>Fix coding standards for controller generation.<commit_after>{% extends "base/class.php.twig" %}

{% block file_path %}
\Drupal\{{module}}\Controller\{{ class_name }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{module}}\Controller;
{% endblock %}

{% block use_class %}
use Drupal\Core\Controller\ControllerBase;
{% if services is not empty %}
use Symfony\Component\DependencyInjection\ContainerInterface;
{% endif %}
{% endblock %}

{% block class_declaration %}
/**
 * Class {{ class_name }}.
 *
 * @package Drupal\{{ module }}\Controller
 */
class {{ class_name }} extends ControllerBase {% endblock %}
{% block class_construct %}
{% if services is not empty %}
  /**
   * {@inheritdoc}
   */
  public function __construct({{ servicesAsParameters(services)|join(', ') }}) {
{{ serviceClassInitialization(services) }}
  }

{% endif %}
{% endblock %}
{% block class_create %}
{% if services is not empty %}
  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static(
{{ serviceClassInjection(services) }}
    );
  }

{% endif %}
{% endblock %}
{% block class_methods %}
{% for route in routes %}
  /**
   * {{ route.method | capitalize }}.
   *
   * @return string
   *   Return Hello string.
   */
  public function {{route.method}}({{ argumentsFromRoute(route.path)|join(', ') }}) {
{% if argumentsFromRoute(route.path) is not empty %}
    return [
      '#type' => 'markup',
      '#markup' => $this->t('Implement method: {{route.method}} with parameter(s): !name', [
        '!name' => '{{ argumentsFromRoute(route.path)|join(', ') }}',
      ]),
    ];
{% else %}
    return [
      '#type' => 'markup',
      '#markup' => $this->t('Implement method: {{route.method}}')
    ];
{% endif %}
  }
{% endfor %}
{% endblock %}
{'fraction_non_alphanumeric': 0.1930022573363431, 'fraction_numerical': 0.0, 'mean_word_length': 3.7015915119363396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1883468', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1080, 'n_words': 239}