From 6fea4568193229b222588494d414237d7ef94579 Mon Sep 17 00:00:00 2001
From: Lucas D Hedding <lucashedding@1463982.no-reply.drupal.org>
Date: Tue, 7 Jan 2025 08:45:03 -0600
Subject: [PATCH 1/3] improve phpcs

---
 .cspell-project-words.txt |  2 ++
 .gitlab-ci.yml            | 56 ++++++++-------------------------------
 phpcs.xml.dist            | 25 -----------------
 3 files changed, 13 insertions(+), 70 deletions(-)
 create mode 100644 .cspell-project-words.txt
 delete mode 100644 phpcs.xml.dist

diff --git a/.cspell-project-words.txt b/.cspell-project-words.txt
new file mode 100644
index 0000000..3be8303
--- /dev/null
+++ b/.cspell-project-words.txt
@@ -0,0 +1,2 @@
+rebecca
+
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5084b9c..a4436e4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,49 +51,15 @@ include:
 variables:
   _SHOW_ENVIRONMENT_VARIABLES: '1'
 
+phpcs:
+  allow_failure: false
+
+phpstan:
+  allow_failure: false
+
+phpstan (next major):
+  allow_failure: true
+
+phpstan (next minor):
+  allow_failure: true
 
-###################################################################################
-#
-#                                        *
-#                                       /(
-#                                      ((((,
-#                                    /(((((((
-#                                   ((((((((((*
-#                                ,(((((((((((((((
-#                              ,(((((((((((((((((((
-#                            ((((((((((((((((((((((((*
-#                         *(((((((((((((((((((((((((((((
-#                       ((((((((((((((((((((((((((((((((((*
-#                    *((((((((((((((((((  .((((((((((((((((((
-#                  ((((((((((((((((((.       /(((((((((((((((((*
-#                /(((((((((((((((((            .(((((((((((((((((,
-#             ,((((((((((((((((((                 ((((((((((((((((((
-#           .((((((((((((((((((((                   .(((((((((((((((((
-#          (((((((((((((((((((((((                     ((((((((((((((((/
-#        (((((((((((((((((((((((((((/                    ,(((((((((((((((*
-#      .((((((((((((((/  /(((((((((((((.                   ,(((((((((((((((
-#     *((((((((((((((      ,(((((((((((((/                   *((((((((((((((.
-#    ((((((((((((((,          /(((((((((((((.                  ((((((((((((((,
-#   (((((((((((((/              ,(((((((((((((*                 ,(((((((((((((,
-#  *(((((((((((((                .(((((((((((((((                ,(((((((((((((
-#  ((((((((((((/                /((((((((((((((((((.              ,((((((((((((/
-# (((((((((((((              *(((((((((((((((((((((((*             *((((((((((((
-# (((((((((((((            ,(((((((((((((..(((((((((((((           *((((((((((((
-# ((((((((((((,          /((((((((((((*      /((((((((((((/         ((((((((((((
-# (((((((((((((        /((((((((((((/          (((((((((((((*       ((((((((((((
-# (((((((((((((/     /((((((((((((               ,((((((((((((,    *((((((((((((
-#  ((((((((((((((  *(((((((((((/                   *((((((((((((.  ((((((((((((/
-#  *((((((((((((((((((((((((((,                      /(((((((((((((((((((((((((
-#   (((((((((((((((((((((((((                         ((((((((((((((((((((((((,
-#   .(((((((((((((((((((((((/                         ,(((((((((((((((((((((((
-#     ((((((((((((((((((((((/                         ,(((((((((((((((((((((/
-#      *(((((((((((((((((((((                         (((((((((((((((((((((,
-#       ,(((((((((((((((((((((,                      ((((((((((((((((((((/
-#         ,(((((((((((((((((((((*                  /((((((((((((((((((((
-#            ((((((((((((((((((((((,           ,/((((((((((((((((((((,
-#              ,(((((((((((((((((((((((((((((((((((((((((((((((((((
-#                 .(((((((((((((((((((((((((((((((((((((((((((((
-#                     .((((((((((((((((((((((((((((((((((((,.
-#                          .,(((((((((((((((((((((((((.
-#
-###################################################################################
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
deleted file mode 100644
index 25ac557..0000000
--- a/phpcs.xml.dist
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ruleset name="Module">
-  <file>.</file>
-  <arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/>
-
-  <!-- Initially include all Drupal and DrupalPractice sniffs. -->
-  <rule ref="vendor/drupal/coder/coder_sniffer/Drupal"/>
-  <rule ref="vendor/drupal/coder/coder_sniffer/DrupalPractice"/>
-
-  <!-- Use 's' to print the full sniff name in the report. -->
-  <!-- A '-' is prefixed to each of these, so s becomes -s, etc. -->
-  <arg value="s"/>
-  <arg value="-colors"/>
-  <arg name='report-width' value='120'/>
-
-  <!-- Ignore all files that match these patterns. They are matched against -->
-  <!-- the full file path and there is an implied wildcard at each end. -->
-  <!-- Periods must be escaped using \. -->
-  <!-- The first two are key to isolating just this project's files. -->
-  <exclude-pattern>web/</exclude-pattern>
-  <exclude-pattern>vendor/</exclude-pattern>
-  <exclude-pattern>\.patch</exclude-pattern>
-  <exclude-pattern>interdiff</exclude-pattern>
-
-</ruleset>
-- 
GitLab


From 74990a025ef4d2423466fc02246a26e33365b05a Mon Sep 17 00:00:00 2001
From: Lucas D Hedding <lucashedding@1463982.no-reply.drupal.org>
Date: Tue, 7 Jan 2025 08:46:41 -0600
Subject: [PATCH 2/3] add cspell

---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a4436e4..54dcfe8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -63,3 +63,5 @@ phpstan (next major):
 phpstan (next minor):
   allow_failure: true
 
+cspell:
+  allow_failure: false
-- 
GitLab


From 0807f9cc40cbf44a4ab56bfacc918008cd806fd9 Mon Sep 17 00:00:00 2001
From: Lucas D Hedding <lucashedding@1463982.no-reply.drupal.org>
Date: Tue, 7 Jan 2025 08:49:59 -0600
Subject: [PATCH 3/3] fix phpcs

---
 src/Plugin/migrate/source/CSV.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Plugin/migrate/source/CSV.php b/src/Plugin/migrate/source/CSV.php
index 68e53cd..7cd2679 100644
--- a/src/Plugin/migrate/source/CSV.php
+++ b/src/Plugin/migrate/source/CSV.php
@@ -238,7 +238,7 @@ class CSV extends SourcePluginBase implements ConfigurableInterface {
     }
     $fields = [];
     foreach ($this->configuration['fields'] as $field) {
-      $fields[$field['name']] = isset($field['label']) ? $field['label'] : $field['name'];
+      $fields[$field['name']] = $field['label'] ?? $field['name'];
     }
     return $fields;
   }
-- 
GitLab