Skip to content
Snippets Groups Projects
Commit 393c2bdb authored by quietone's avatar quietone
Browse files

Merge branch '3503912-fix-drupal.commenting.functioncomment.missing-in' into '11.x'

Resolve #3503912 "Fix drupal.commenting.functioncomment.missing in Plugins"

See merge request !11086
parents 72587631 7121ba3e
No related branches found
No related tags found
No related merge requests found
Pipeline #439527 failed
Showing
with 65 additions and 11 deletions
......@@ -48,6 +48,9 @@ class Rss extends RssPluginBase {
*/
protected $entityTypeId = 'comment';
/**
* {@inheritdoc}
*/
public function preRender($result) {
$cids = [];
......@@ -68,6 +71,9 @@ public function buildOptionsForm_summary_options() {
return $options;
}
/**
* {@inheritdoc}
*/
public function render($row) {
global $base_url;
......
......@@ -267,6 +267,7 @@ public function getHTMLRestrictions() {
$scanner = new Scanner('<body>' . $html);
$parser = new class($scanner, $events) extends Tokenizer {
// phpcs:ignore Drupal.Commenting.FunctionComment.Missing
public function setTextMode($textMode, $untilTag = NULL) {
// Do nothing, we never enter text mode.
}
......
......@@ -56,11 +56,17 @@ public function buildOptionsForm_summary_options() {
return $options;
}
/**
* {@inheritdoc}
*/
public function summaryTitle() {
$options = $this->buildOptionsForm_summary_options();
return $options[$this->options['view_mode']];
}
/**
* {@inheritdoc}
*/
public function preRender($values) {
$nids = [];
foreach ($values as $row) {
......@@ -71,6 +77,9 @@ public function preRender($values) {
}
}
/**
* {@inheritdoc}
*/
public function render($row) {
global $base_url;
......
......@@ -38,6 +38,9 @@ public static function create(ContainerInterface $container, array $configuratio
return $instance;
}
/**
* Sets the request stack to the given input.
*/
public function setRequestStack(RequestStack $requestStack): void {
$this->requestStack = $requestStack;
}
......
......@@ -13,6 +13,9 @@
#[\Attribute]
class ExtendingNonInstalledClass extends NonExisting {
/**
* Provides an empty test method for testing.
*/
#[TrustedCallback]
public function testMethod() {}
......
......@@ -13,6 +13,9 @@
class UsingNonInstalledTraitClass {
use NonExistingTrait;
/**
* Provides an empty test method.
*/
#[TrustedCallback]
public function testMethod() {}
......
......@@ -17,6 +17,9 @@ class MockComplexContextBlock extends PluginBase implements ContextAwarePluginIn
use ContextAwarePluginTrait;
/**
* Returns the title of the block.
*/
public function getTitle() {
$user = $this->getContextValue('user');
$node = $this->getContextValue('node');
......
......@@ -25,6 +25,9 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
$this->title = $configuration['title'] ?? '';
}
/**
* Returns the title of the block.
*/
public function getTitle() {
return $this->title;
}
......
......@@ -17,6 +17,9 @@ class MockUserNameBlock extends PluginBase implements ContextAwarePluginInterfac
use ContextAwarePluginTrait;
/**
* Returns the title of the block.
*/
public function getTitle() {
$user = $this->getContextValue('user');
return $user->label();
......
......@@ -18,6 +18,9 @@ class TypedDataStringBlock extends PluginBase implements ContextAwarePluginInter
use ContextAwarePluginTrait;
/**
* Returns the title of the block.
*/
public function getTitle() {
return $this->getContextValue('string');
}
......
......@@ -53,12 +53,18 @@ public static function create(ContainerInterface $container, array $configuratio
);
}
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['vids'] = ['default' => []];
return $options;
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$vocabularies = $this->vocabularyStorage->loadMultiple();
$options = [];
......
......@@ -16,6 +16,9 @@
)]
class None extends ArgumentValidatorPluginBase {
/**
* {@inheritdoc}
*/
public function validateArgument($argument) {
if (!empty($this->argument->options['must_not_be'])) {
return !isset($argument);
......
......@@ -17,6 +17,9 @@
)]
class NumericArgumentValidator extends ArgumentValidatorPluginBase {
/**
* {@inheritdoc}
*/
public function validateArgument($argument) {
return is_numeric($argument);
}
......
......@@ -30,6 +30,9 @@ class Fields extends RowPluginBase {
*/
protected $usesFields = TRUE;
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
......
......@@ -26,6 +26,9 @@ class RssFields extends RowPluginBase {
*/
protected $usesFields = TRUE;
/**
* {@inheritdoc}
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['title_field'] = ['default' => ''];
......@@ -38,6 +41,9 @@ protected function defineOptions() {
return $options;
}
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
......@@ -106,6 +112,9 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
];
}
/**
* {@inheritdoc}
*/
public function validate() {
$errors = parent::validate();
$required_options = ['title_field', 'link_field', 'description_field', 'creator_field', 'date_field'];
......@@ -122,6 +131,9 @@ public function validate() {
return $errors;
}
/**
* {@inheritdoc}
*/
public function render($row) {
static $row_index;
if (!isset($row_index)) {
......
......@@ -68,17 +68,7 @@
<rule ref="Drupal.Commenting.FileComment"/>
<rule ref="Drupal.Commenting.FunctionComment"/>
<rule ref="Drupal.Commenting.FunctionComment.Missing">
<include-pattern>core/modules/*/Plugin/views/argument/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/filter/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/access/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/cache/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/query/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/sort/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/display/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/exposed_form/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/field/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/pager/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/style/*</include-pattern>
<include-pattern>core/*/src/Plugin/*</include-pattern>
<include-pattern>*/Database/*</include-pattern>
<include-pattern>*/FunctionalJavascript/*</include-pattern>
<include-pattern>*/Functional/*</include-pattern>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment