Commit 3a7dadb1 authored by Jakob Perry's avatar Jakob Perry
Browse files

Update coding standards before release

parent d16214a4
......@@ -566,7 +566,9 @@ function captcha_validate($element, FormStateInterface &$form_state) {
* @return array
* The manipulated element.
*
* @deprecated Use \Drupal\captcha\Element\Captcha::preRenderProcess() instead.
* @deprecated in captcha:8.x-1.0 and is removed from captcha:8.x-2.0.
* Use \Drupal\captcha\Element\Captcha::preRenderProcess() instead.
* @see https://www.drupal.org/project/captcha/issues/1949682
*/
function captcha_pre_render_process(array $element) {
return Captcha::preRenderProcess($element);
......
......@@ -2,9 +2,12 @@
"name": "drupal/captcha",
"description": "The CAPTCHA module provides this feature to virtually any user facing web form on a Drupal site.",
"type": "drupal-module",
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"homepage": "https://www.drupal.org/project/captcha",
"support": {
"issues": "https://www.drupal.org/project/issues/captcha"
"issues": "https://www.drupal.org/project/issues/captcha",
"source": "https://git.drupalcode.org/project/captcha"
},
"require": {
"drupal/core": "^8.8 || ^9"
......
......@@ -35,11 +35,11 @@ class ImageCaptchaSettingsForm extends ConfigFormBase {
/**
* Constructs a \Drupal\image_captcha\Form\ImageCaptchaSettingsForm object.
*
* @param ConfigFactoryInterface $config_factory
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
* @param LanguageManagerInterface $language_manager
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param FileSystemInterface $fileSystem
* @param \Drupal\Core\File\FileSystemInterface $fileSystem
* The file_system service.
*/
public function __construct(ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager, FileSystemInterface $fileSystem) {
......
......@@ -50,10 +50,26 @@ use Drupal\Core\Config\Entity\ConfigEntityBase;
* )
*/
class CaptchaPoint extends ConfigEntityBase implements CaptchaPointInterface {
/**
* The captcha type.
*
* @var string
*/
public $captchaType;
/**
* The captcha label.
*
* @var string
*/
protected $label;
/**
* The formid associated with the captcha.
*
* @var string
*/
public $formId;
/**
......
......@@ -32,6 +32,8 @@ class CaptchaPointForm extends EntityForm {
*
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* Constructor.
* @param \Drupal\captcha\Service\CaptchaService $captcha_service
* The captcha service.
*/
public function __construct(RequestStack $request_stack, CaptchaService $captcha_service) {
$this->requestStack = $request_stack;
......
......@@ -46,6 +46,8 @@ class CaptchaSettingsForm extends ConfigFormBase {
* Cache backend instance to use.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* Module handler.
* @param \Drupal\captcha\Service\CaptchaService $captcha_service
* The captcha service.
*/
public function __construct(ConfigFactoryInterface $config_factory, CacheBackendInterface $cache_backend, ModuleHandlerInterface $moduleHandler, CaptchaService $captcha_service) {
parent::__construct($config_factory);
......
......@@ -67,7 +67,7 @@ class CaptchaService {
* @param array $captcha_element
* the CAPTCHA element to insert.
*/
function insertCaptchaElement(array &$form, array $placement, array $captcha_element) {
public function insertCaptchaElement(array &$form, array $placement, array $captcha_element) {
// Get path, target and target weight or use defaults if not available.
$target_key = isset($placement['key']) ? $placement['key'] : NULL;
$target_weight = isset($placement['weight']) ? $placement['weight'] : NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment