Skip to content
Snippets Groups Projects
Commit 18956c65 authored by Aly Machaca's avatar Aly Machaca Committed by Lee Rowlands
Browse files

Issue #3486442 by larowlan, alyaj2a: Fix coding standard issues and add gitlabci.yml

parent 2203b269
No related branches found
No related tags found
1 merge request!3Coding standard issues - #3486442
Pipeline #384298 passed
analysing
analyse
larowlan
analysed
covidsafe
ffaa
mqnay
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
variables:
_TARGET_DB_VERSION: "$CORE_MYSQL_MAX"
OPT_IN_TEST_PREVIOUS_MINOR: 1
OPT_IN_TEST_PREVIOUS_MAJOR: 1
OPT_IN_TEST_NEXT_MINOR: 1
OPT_IN_TEST_NEXT_MAJOR: 1
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="drupal-project">
<description>PHP CodeSniffer configuration for a larowlan project.</description>
<rule ref="Drupal"/>
<arg name="extensions" value="php,inc,module,install,info,test,profile,theme"/>
<rule ref="Drupal.Commenting.DocComment.MissingShort">
<severity>0</severity>
</rule>
<!-- We can leave the following to PHPstan. -->
<rule ref="Drupal.Commenting.VariableComment.MissingVar">
<severity>0</severity>
</rule>
</ruleset>
parameters:
ignoreErrors:
-
message: "#^Parameter \\$context of method Drupal\\\\filter_format_audit\\\\Form\\\\RunAnalysisForm\\:\\:analyse\\(\\) has invalid type DrushBatchContext\\.$#"
count: 1
path: src/Form/RunAnalysisForm.php
-
message: "#^Parameter \\$context of method Drupal\\\\filter_format_audit\\\\Form\\\\RunAnalysisForm\\:\\:clear\\(\\) has invalid type DrushBatchContext\\.$#"
count: 1
path: src/Form/RunAnalysisForm.php
-
message: "#^Call to static method decode\\(\\) on an unknown class Drupal\\\\Core\\\\Serialization\\\\Yaml\\.$#"
count: 1
path: tests/src/Kernel/FilterFormatAnalysisTest.php
includes:
- phpstan-baseline.neon
parameters:
level: 1
paths:
- src
- tests
ignoreErrors:
- '#Unsafe usage of new static#'
reportUnmatchedIgnoredErrors: true
......@@ -65,7 +65,8 @@ final class AnalysisBatchBuilder {
->accessCheck(FALSE)
->condition("$field_name.format", array_keys($formats), 'IN');
$results = $query->execute();
} catch (QueryException $e) {
}
catch (QueryException $e) {
// Corrupt field map.
continue;
}
......
......@@ -2,11 +2,11 @@
namespace Drupal\filter_format_audit;
use Drupal\Component\Utility\Html;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\filter_format_audit\Entity\AnalysisResult;
use Drupal\Component\Utility\Html;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\filter_format_audit\Entity\AnalysisResult;
/**
* Defines a class for analysing imported content.
......@@ -37,7 +37,7 @@ class ContentAnalysis {
*/
public function __construct(
EntityTypeManagerInterface $entity_type_manager,
ConfigFactoryInterface $config_factory
ConfigFactoryInterface $config_factory,
) {
$this->entityTypeManager = $entity_type_manager;
$this->configFactory = $config_factory;
......
......@@ -6,8 +6,8 @@ use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityHandlerInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Url;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -26,6 +26,7 @@ class FilterFormatAuditHandlerDefault implements FilterFormatAuditHandlerInterfa
* Constructs a new FilterFormatAuditHandlerDefault.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
* The entity type manager service.
*/
public function __construct(EntityTypeManagerInterface $entityTypeManager) {
$this->entityTypeManager = $entityTypeManager;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment