From 4bfec6d96b950cd232834f1fd1572306815024df Mon Sep 17 00:00:00 2001
From: Grevil <js@webks.de>
Date: Wed, 10 Jan 2024 09:36:22 +0100
Subject: [PATCH] Fix phpcs issues

---
 README.md        |  4 ++--
 perimeter.module | 15 ++++++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 3a3e510..207013f 100644
--- a/README.md
+++ b/README.md
@@ -33,8 +33,8 @@ This module requires no modules outside of Drupal core.
 
 ## Installation
 
-Install as you would normally install a contributed Drupal module. For further information, see
-[Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
+Install as you would normally install a contributed Drupal module. For further
+information, see [Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
 
 
 ## Configuration
diff --git a/perimeter.module b/perimeter.module
index 14310de..8f8db1f 100644
--- a/perimeter.module
+++ b/perimeter.module
@@ -1,7 +1,13 @@
 <?php
-use Drupal\Core\Database\Database;
+
+/**
+ * @file
+ * The perimeter module file.
+ */
+
 use Drupal\ban\BanIpManager;
 use Drupal\Component\Utility\Xss;
+use Drupal\Core\Database\Database;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
@@ -22,10 +28,13 @@ function perimeter_help($route_name, RouteMatchInterface $route_match) {
   }
 }
 
-function perimeter_honeypot_reject($form_id, $uid, $type){
+/**
+ * Implements hook_honeypot_reject().
+ */
+function perimeter_honeypot_reject($form_id, $uid, $type) {
   // Honeypot might remove the uid param at some point later.
   $uid = \Drupal::currentUser()->id();
-  if($uid != 1 && ($type=='honeypot_time' && $form_id != 'user_login_form')){
+  if ($uid != 1 && ($type == 'honeypot_time' && $form_id != 'user_login_form')) {
     $ip = \Drupal::request()->getClientIp();
     $connection = Database::getConnection();
     $banManager = new BanIpManager($connection);
-- 
GitLab