diff --git a/module/VuFind/src/VuFind/ILS/Driver/Folio.php b/module/VuFind/src/VuFind/ILS/Driver/Folio.php
index 0cb009b4fece10d1effa5e296c8a684b1253a92d..d8e665dc28f07d8b396fe4dd36c37d06ec3d5fb7 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Folio.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Folio.php
@@ -835,6 +835,8 @@ class Folio extends AbstractAPI implements
      *
      * @return array An array of associative arrays with locationID and
      * locationDisplay keys
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function getPickupLocations($patron)
     {
diff --git a/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php b/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php
index b6faf647834e8c4adb0c2bf100998f98d9b7f441..ddfeaf88ab2480eeffd4409e0e8bffda8db3e3d4 100644
--- a/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php
+++ b/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php
@@ -62,6 +62,9 @@ class CspHeaderGeneratorFactory implements FactoryInterface
     public function __invoke(ContainerInterface $container, $requestedName,
         array $options = null
     ) {
+        if (!empty($options)) {
+            throw new \Exception('Unexpected options passed to factory.');
+        }
         $config = $container->get(\VuFind\Config\PluginManager::class)
             ->get('contentsecuritypolicy');
         $nonceGenerator = $container->get(NonceGenerator::class);