From 4424ea54e93da9e9ea125e07037bc3db7e8af590 Mon Sep 17 00:00:00 2001
From: Dag <me@dvikan.no>
Date: Sun, 11 Aug 2024 02:31:50 +0200
Subject: [PATCH] chore: increase linter speed (#4211)

---
 composer.json          | 2 +-
 index.php              | 3 +++
 lib/BridgeAbstract.php | 6 +++---
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/composer.json b/composer.json
index 34f1a80f..cafcd085 100644
--- a/composer.json
+++ b/composer.json
@@ -49,7 +49,7 @@
     },
     "scripts": {
         "test": "./vendor/bin/phpunit",
-        "lint": "./vendor/bin/phpcs --standard=phpcs.xml --warning-severity=0 --extensions=php -p ./",
+        "lint": "./vendor/bin/phpcs --parallel=2 --standard=phpcs.xml --warning-severity=0 --extensions=php -p ./",
         "compat": "./vendor/bin/phpcs --standard=phpcompatibility.xml --warning-severity=0 --extensions=php -p ./"
     }
 }
diff --git a/index.php b/index.php
index d29900f7..1efda44a 100644
--- a/index.php
+++ b/index.php
@@ -62,6 +62,9 @@ register_shutdown_function(function () use ($logger) {
 
 $cacheFactory = new CacheFactory($logger);
 
+// Uncomment this for debug logging
+// $logger->addHandler(new StreamHandler('/tmp/rss-bridge.txt', Logger::DEBUG));
+
 if (Debug::isEnabled()) {
     $logger->addHandler(new ErrorLogHandler(Logger::DEBUG));
     $cache = $cacheFactory->create('array');
diff --git a/lib/BridgeAbstract.php b/lib/BridgeAbstract.php
index 6444b6aa..23e90e13 100644
--- a/lib/BridgeAbstract.php
+++ b/lib/BridgeAbstract.php
@@ -2,8 +2,8 @@
 
 abstract class BridgeAbstract
 {
-    const NAME = 'Unnamed bridge';
-    const URI = '';
+    const NAME = null;
+    const URI = null;
     const DONATION_URI = '';
     const DESCRIPTION = 'No description provided';
 
@@ -61,7 +61,7 @@ abstract class BridgeAbstract
 
     public function getName()
     {
-        return static::NAME;
+        return static::NAME ?? $this->getShortName();
     }
 
     public function getURI()